{"id":13515605,"url":"https://github.com/59naga/eastern","last_synced_at":"2025-12-27T08:30:14.671Z","repository":{"id":57218297,"uuid":"141592481","full_name":"59naga/eastern","owner":"59naga","description":":fireworks: a minimal \u0026 blazing fast BDD Framework for ESM Modules","archived":false,"fork":false,"pushed_at":"2018-09-18T06:26:11.000Z","size":81,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T14:55:42.713Z","etag":null,"topics":["bdd","mjs","test"],"latest_commit_sha":null,"homepage":"https://github.com/59naga/eastern-cli","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/59naga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-19T14:38:50.000Z","updated_at":"2023-03-10T10:33:58.000Z","dependencies_parsed_at":"2022-08-28T21:41:02.901Z","dependency_job_id":null,"html_url":"https://github.com/59naga/eastern","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/59naga%2Feastern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/59naga%2Feastern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/59naga%2Feastern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/59naga%2Feastern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/59naga","download_url":"https://codeload.github.com/59naga/eastern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239717479,"owners_count":19685713,"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","mjs","test"],"created_at":"2024-08-01T05:01:13.394Z","updated_at":"2025-12-27T08:30:14.629Z","avatar_url":"https://github.com/59naga.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cp align=\"right\"\u003e\n  \u003cimg width=\"300\" alt=\"Eastern\" src=\"https://user-images.githubusercontent.com/1548478/44305426-d7365080-a3b1-11e8-9f7d-0ea817f15db0.png\"\u003e\n\u003c/p\u003e\n\nEastern\n---\n\n\u003cp align=\"right\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/eastern\"\u003e\n    \u003cimg alt=\"Npm version\" src=\"https://badge.fury.io/js/eastern.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/59naga/eastern\"\u003e\n    \u003cimg alt=\"Build Status\" src=\"https://travis-ci.org/59naga/eastern.svg?branch=master\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\na minimal \u0026 blazing fast BDD Framework for [ESM Modules](https://nodejs.org/api/esm.html#esm_enabling)\n\nInstallation\n---\n\n```bash\nnpm install eastern eastern-cli --global\n# or\nyarn global add eastern eastern-cli\n```\n\nThe `eastern` command defines `global.it`, `global.describe`.\nAnd find and run `test.mjs` / `test/**/*.mjs`.\n\n```bash\neastern\n# \n#   0 passing (5 ms)\n```\n\nAPI\n---\n## `it.setOptions` / `setOptions`\n\n```js\nit.setOptions({ concurrency: 1, timeout: 100 });\n```\n\n\u003e Specs of the same level are executed in parallel, and there is a possibility that hooks conflict.\n\u003e In that case, please set the `concurrency` of that level to 1 and execute it in series. using `it.setOptions`\n\n## `it(title, context)`\n\n```js\nit(\"foo\", () =\u003e {});\n```\n\n```\n  ✓  foo (1 ms)\n\n  1 passing (7 ms)\n```\n\n## `it(title)`, `it.skip(title)`\n\n```js\nit(\"foo\");\nit.skip(\"bar\");\n```\n\n```\n\n  -  foo\n  -  bar\n\n  0 passing (6 ms)\n  2 pending\n\n```\n\n## `it.only`\n\n```js\nit(\"foo\", () =\u003e {\n  throw new Error(\"ignored\");\n});\nit.only(\"bar\", () =\u003e {});\nit.only(\"bar\", () =\u003e {});\n```\n\n```\n  -  foo\n  ✓  bar (2 ms)\n  ✓  bar (2 ms)\n\n  1 passing (8 ms)\n  1 pending\n```\n\n## `it.before`\n\n```js\nimport delay from \"delay\";\n\nit.before(() =\u003e {\n  console.log(\"foo\");\n});\n\nit.before(async () =\u003e {\n  await delay(15);\n  console.log(\"bar\");\n});\n\nit.before(() =\u003e {\n  console.log(\"baz\");\n});\n\nit(\"beep\", () =\u003e {});\nit(\"beep\", () =\u003e {});\nit(\"beep\", () =\u003e {});\n```\n\n```\nfoo\nbar\nbaz\n  ✓  beep (1 ms)\n  ✓  beep (1 ms)\n  ✓  beep (1 ms)\n\n  3 passing (26 ms)\n```\n\n## `it.after`\n\n```js\nimport delay from \"delay\";\n\nit.after(() =\u003e {\n  console.log(\"bar\");\n});\n\nit.after(async () =\u003e {\n  await delay(15);\n  console.log(\"baz\");\n});\n\nit.after(() =\u003e {\n  console.log(\"beep\");\n});\n\nit(\"foo\", () =\u003e {});\nit(\"foo\", () =\u003e {});\nit(\"foo\", () =\u003e {});\n```\n\n```\n  ✓  foo (1 ms)\n  ✓  foo (2 ms)\n  ✓  foo (2 ms)\nbar\nbaz\nbeep\n\n  3 passing (27 ms)\n```\n\n## `it.beforeEach`\n\n```js\nit.setOptions({ concurrency: 1 });\nit.beforeEach(async () =\u003e {\n  await delay(5);\n  console.log(\"foo\");\n});\nit(\"bar\", () =\u003e {});\nit(\"bar\", () =\u003e {});\nit(\"bar\", () =\u003e {});\n```\n\n```\nfoo\n  ✓  bar (8 ms)\nfoo\n  ✓  bar (7 ms)\nfoo\n  ✓  bar (5 ms)\n\n  3 passing (28 ms)\n```\n\n## `it.afterEach`\n\n```js\nimport delay from \"delay\";\n\nit.setOptions({ concurrency: 1 });\nit.afterEach(async () =\u003e {\n  await delay(5);\n  console.log(\"bar\");\n});\nit(\"foo\", () =\u003e {});\nit(\"foo\", () =\u003e {});\nit(\"foo\", () =\u003e {});\n```\n\n```\nbar\n  ✓  foo (1 ms)\nbar\n  ✓  foo (0 ms)\nbar\n  ✓  foo (0 ms)\n\n  3 passing (28 ms)\n```\n\n## `describe(title, fn(it, describe){})`\n## `describe(title)`, `describe.skip(title)`\n\n```js\nimport delay from \"delay\";\n\nit.setOptions({ concurrency: 1 });\ndescribe(\"1\", it, describe) =\u003e {\n  it.before(() =\u003e {\n    console.log(\"  1-before\");\n  });\n  it.beforeEach(() =\u003e {\n    console.log(\"  1-beforeEach\");\n  });\n  it.afterEach(() =\u003e {\n    console.log(\"  1-afterEach\");\n  });\n  it.after(() =\u003e {\n    console.log(\"  1-after\");\n  });\n\n  it(\"1-1\");\n  it.skip(\"1-2\");\n  it(\"1-notonly-1\", () =\u003e {});\n  it.only(\"1-only-1\", async () =\u003e {\n    await delay(5);\n  });\n  it.only(\"1-only-2\", async () =\u003e {\n    await delay(5);\n  });\n\n  describe(\"2\");\n  describe(\"3\", it, describe) =\u003e {\n    it.before(() =\u003e {\n      console.log(\"      3-before\");\n    });\n    it.beforeEach(() =\u003e {\n      console.log(\"      3-beforeEach\");\n    });\n    it.afterEach(() =\u003e {\n      console.log(\"      3-afterEach\");\n    });\n    it.after(() =\u003e {\n      console.log(\"      3-after\");\n    });\n\n    it(\"3-1\");\n    it.skip(\"3-2\");\n    it(\"3-notonly-1\", () =\u003e {});\n    it.only(\"3-only-1\", async () =\u003e {\n      await delay(5);\n    });\n    it.only(\"3-only-2\", async () =\u003e {\n      await delay(5);\n    });\n\n    describe(\"4\");\n    describe(\"5\", it =\u003e {\n      it(\"5\");\n    });\n  });\n});\n```\n\n```\n  1\n  1-before\n    -  1-1\n    -  1-2\n    -  1-notonly-1\n  1-beforeEach\n  1-afterEach\n    ✓  1-only-1 (7 ms)\n  1-beforeEach\n  1-afterEach\n    ✓  1-only-2 (6 ms)\n    -  2\n    3\n      3-before\n      -  3-1\n      -  3-2\n      -  3-notonly-1\n      3-beforeEach\n      3-afterEach\n      ✓  3-only-1 (7 ms)\n      3-beforeEach\n      3-afterEach\n      ✓  3-only-2 (6 ms)\n      -  4\n      5\n        -  5\n      3-after\n  1-after\n\n  4 passing (39 ms)\n  9 pending\n\nTEST FAILING\n```\n\nLicense\n---\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F59naga%2Feastern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F59naga%2Feastern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F59naga%2Feastern/lists"}