{"id":15017412,"url":"https://github.com/paulmillr/micro-should","last_synced_at":"2025-04-12T11:44:00.804Z","repository":{"id":57157212,"uuid":"200623513","full_name":"paulmillr/micro-should","owner":"paulmillr","description":"Simplest zero-dependency testing framework, a drop-in replacement for Mocha.","archived":false,"fork":false,"pushed_at":"2023-02-04T09:53:19.000Z","size":792,"stargazers_count":16,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-08T17:03:00.068Z","etag":null,"topics":["bdd","framework","it","jasmine","jest","karma","micro","mocha","should","tdd","test","testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulmillr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-05T09:19:51.000Z","updated_at":"2024-01-09T08:27:00.000Z","dependencies_parsed_at":"2023-02-14T14:40:27.104Z","dependency_job_id":null,"html_url":"https://github.com/paulmillr/micro-should","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulmillr%2Fmicro-should","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulmillr%2Fmicro-should/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulmillr%2Fmicro-should/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulmillr%2Fmicro-should/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulmillr","download_url":"https://codeload.github.com/paulmillr/micro-should/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248564089,"owners_count":21125405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bdd","framework","it","jasmine","jest","karma","micro","mocha","should","tdd","test","testing"],"created_at":"2024-09-24T19:50:25.564Z","updated_at":"2025-04-12T11:44:00.510Z","avatar_url":"https://github.com/paulmillr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# micro-should\n\nSimplest zero-dependency testing framework, a drop-in replacement for Mocha.\n\nSupports async cases. Works with any assertion library.\n\n* `should(title, case)` (or `it(title, case)`) syntax\n* `should.only(title, case)` allows to limit tests to only one case\n* `should.skip(title, case)` allows to skip functions instead of commenting them out\n* `describe(prefix, cases)` for nested execution\n* `should.run()` must always be executed in the end\n* `should.runParallel()` for CPU-intensive tasks, would ramp up threads equal to CPU count\n\n\u003e npm install micro-should\n\n![](https://raw.githubusercontent.com/paulmillr/micro-should/e60028e947f3158c46314ef105b51b2a2948c025/screenshot.png)\n\n## Usage\n\n```js\nconst { should } = require('micro-should');\nconst assert = require('assert'); // You can use any assertion library (e.g. Chai or Expect.js), example uses built-in nodejs\n\nshould('add two numbers together', () =\u003e {\n  assert.equal(2 + 2, 4);\n});\n\nshould('catch errors', () =\u003e {\n  assert.throws(() =\u003e {\n    throw new Error('invalid');\n  });\n});\n\nshould('produce correct promise result', async () =\u003e {\n  const fs = require('fs').promises;\n  const data = await fs.readFile('README.md', 'utf-8');\n  assert.ok(data.includes('Minimal testing'));\n});\n\n// should.only(\"execute only one test\", () =\u003e {\n//   assert.ok(true);\n// });\n\n// should.skip(\"disable one test by using skip\", () =\u003e {\n//   assert.ok(false); // would not execute\n// })\n\n// Nested\nconst { describe } = require('micro-should');\ndescribe('during any time of day', () =\u003e {\n  describe('without hesitation', () =\u003e {\n    should('multiply two numbers together', () =\u003e {\n      assert.equal(2 * 2, 4);\n    });\n\n    should('multiply three numbers together', () =\u003e {\n      assert.equal(3 * 3 * 3, 27);\n    });\n  });\n});\n\n// Execute this at the end of a file.\nshould.run();\n```\n\n## License\n\nMIT (c) Paul Miller (https://paulmillr.com), see LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulmillr%2Fmicro-should","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulmillr%2Fmicro-should","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulmillr%2Fmicro-should/lists"}