{"id":19450980,"url":"https://github.com/rixo/esm-hmr-spec","last_synced_at":"2026-05-16T09:03:11.318Z","repository":{"id":147723852,"uuid":"338934143","full_name":"rixo/esm-hmr-spec","owner":"rixo","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-02T20:04:01.000Z","size":126,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-25T09:29:21.755Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/rixo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-15T00:43:14.000Z","updated_at":"2021-04-02T20:04:03.000Z","dependencies_parsed_at":"2023-04-03T14:49:10.648Z","dependency_job_id":null,"html_url":"https://github.com/rixo/esm-hmr-spec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rixo/esm-hmr-spec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fesm-hmr-spec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fesm-hmr-spec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fesm-hmr-spec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fesm-hmr-spec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rixo","download_url":"https://codeload.github.com/rixo/esm-hmr-spec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fesm-hmr-spec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285215532,"owners_count":27133906,"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","status":"online","status_checked_at":"2025-11-19T02:00:05.673Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-10T16:39:48.387Z","updated_at":"2025-11-19T09:03:17.848Z","avatar_url":"https://github.com/rixo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESM HMR Spec\n\n\u003e A test suite to explore the behaviour of `esm-hmr` flavours.\n\nThe far cry hope is that an objective and verifiable set of rules might help with aligning behind a standard API. For the greater good of ESM adapters implementers and, ultimately, the users of your tool.\n\n## Install\n\n```bash\ngit clone git@github.com:rixo/esm-hmr-spec.git\ncd esm-hmr-spec\nyarn\n```\n\n## Usage\n\n```bash\nyarn test --snowpack\n```\n\n```bash\nyarn test --vite\n```\n\n## Development\n\n`esm-hmr-spec` is powered by [test-hmr](https://github.com/rixo/test-hmr) v0.2+, itself powered by ~~poorly~~ lightly documented [zoar](https://github.com/rixo/zoar) test runner, and [zorax](https://github.com/rixo/zorax) extensions (themselves built upon the great [zora](https://github.com/lorenzofox3/zora) essentialist testing library).\n\nHere are a few tips about the most useful commands you can use...\n\n**NOTE** `thc` (test-hmr cli) is aliased as `test` in `package.json`, but all the following commands are really just running `thc` itself... You could just as well use `yarn thc` or `node_modules/.bin/thc`.\n\n### Watch mode\n\n```bash\nyarn test --watch\n```\n\nIn watch mode, pressing \u003ckbd\u003eEnter\u003c/kbd\u003e will rerun the tests.\n\nAlso, further options can be passed / changed interactively, without the need to restart the test runner. The available options are essentially the same as the argument accepted by the cli (see bellow for a curated selection).\n\nThe interactive console accepts options in long (e.g. `--filter`) or shortcut form (e.g. `-f`), with or without the leading `--` / `-`.\n\nAdding `?` after the option name will display the current option value. Adding `!` will reset the option to `false` / empty.\n\nEntering just `!!` (or pressing \u003ckbd\u003eEsc\u003c/kbd\u003e) will reset all options to their _initial_ value (that is, the value that have been passed to the cli command).\n\nSo you can do something like this (`$` is the term, `\u003e` is zoar's interactive console):\n\n```bash\n$ zoar -w -f sanity\n...\n\u003e f? # show the current filter\n\u003e f! # reset the filter\n...\n\u003e ls # print matched files (switches to ls mode)\n\u003e f single # change the filter (and rerun ls)\n\u003e run #  run the tests (switches back to run mode)\n...\n\u003e ib # debug the test in Node (short for --inspect-brk)\n...\n\u003e ib! # stop debugging in Node\n...\n\u003e e OPEN # open the browser while running test (allowing for in-browser debugging)\n...\n\u003e e? # display current env variables that are passed to the test process\n\u003e e! # stop opening browser while running test\n...\n\u003e !! # reset to initial options (`-f sanity`, in this example)\n```\n\nIn default interactive (watch) console, entering any command will rerun the tests immediately. When you want to change several options at once, this might not be desirable. You can switch to deferred interactive mode by pressing \u003ckbd\u003e:\u003c/kbd\u003e. In this mode, options are changed without rerunning the tests. Go back to fully interactive mode by pressing \u003ckbd\u003eEnter\u003c/kbd\u003e or \u003ckbd\u003eCtrl+C\u003c/kbd\u003e.\n\n### Useful options\n\nHelp:\n\n```bash\nyarn test --help # -h\n```\n\nRun test process with `--inspect-brk` (allow debugging Snowpack code):\n\n```bash\nyarn test --inspect-brk # --ib\n```\n\nOpen Playwright browser while running tests (with slowmo and also cancelling tests timeout -- allow debugging the JS running in the browser, by adding `debugger` in the fixtures' JS):\n\n```bash\nyarn test --open # -o\n```\n\nDisplay browser console output:\n\n```bash\nyarn test --console # -c\n```\n\nFilter tests by file name:\n\n```bash\nyarn test --filter sanity # -f sanity\n```\n\nShow the files matched by your filter:\n\n```bash\nyarn test --ls\n```\n\nFilter tests by test name:\n\n```bash\nyarn test --grep serve # -g serve\n```\n\nPrint all the tests matched by the filters (instead of running them):\n\n```bash\nyarn test --print # -p\n```\n\nModifier options can all be mixed and matched:\n\n```bash\nyarn test --filter sanity --grep serve --ls\nyarn test --filter sanity --grep serve --print\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixo%2Fesm-hmr-spec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frixo%2Fesm-hmr-spec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixo%2Fesm-hmr-spec/lists"}