{"id":19450950,"url":"https://github.com/rixo/test-hmr","last_synced_at":"2025-06-24T18:32:53.322Z","repository":{"id":37165921,"uuid":"197993235","full_name":"rixo/test-hmr","owner":"rixo","description":"Testbed for Webpack HMR","archived":false,"fork":false,"pushed_at":"2023-08-04T23:08:24.000Z","size":1085,"stargazers_count":1,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T09:28:59.354Z","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}},"created_at":"2019-07-21T00:04:17.000Z","updated_at":"2023-06-24T14:54:32.000Z","dependencies_parsed_at":"2023-02-08T03:17:23.773Z","dependency_job_id":null,"html_url":"https://github.com/rixo/test-hmr","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/rixo/test-hmr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Ftest-hmr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Ftest-hmr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Ftest-hmr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Ftest-hmr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rixo","download_url":"https://codeload.github.com/rixo/test-hmr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Ftest-hmr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261733893,"owners_count":23201747,"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":[],"created_at":"2024-11-10T16:39:40.846Z","updated_at":"2025-06-24T18:32:53.299Z","avatar_url":"https://github.com/rixo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snowgun\n\n\u003e Spawning Snowpack projects on-demand for testing purposes.\n\n**Status:** work in progress, currently focused on testing Snowpack HMR behaviour.\n\n## Install\n\n```bash\ngit clone git@github.com:rixo/snowgun.git\ncd snowgun\nyarn\n```\n\n## Usage\n\n```bash\nyarn test\n```\n\n## Development\n\nSnowgun is 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** `zoar` is aliased as `test` in `package.json`, but all the following commands are really just running `zoar` itself... You could just as well use `yarn zoar` or `node_modules/.bin/zoar`.\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 (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\n### Useful options\n\nHelp:\n\n```bash\nyarn test --help\n```\n\nRun test process with `--inspect-brk` (allow debugging Snowpack code):\n\n```bash\nyarn test --inspect-brk\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 --env OPEN\n```\n\nDisplay brower console output:\n\n```bash\nyarn test --env CONSOLE\n```\n\nFilter tests by file name:\n\n```bash\nyarn test --filter 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\n```\n\nPrint all the tests matched by the filters (instead of running them):\n\n```bash\nyarn test --print\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%2Ftest-hmr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frixo%2Ftest-hmr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixo%2Ftest-hmr/lists"}