{"id":19921875,"url":"https://github.com/dhershman1/tapidatcher","last_synced_at":"2025-07-07T00:05:06.179Z","repository":{"id":84494562,"uuid":"395797661","full_name":"dhershman1/tapidatcher","owner":"dhershman1","description":"Soon to become a intelligent test watcher for tape","archived":false,"fork":false,"pushed_at":"2022-07-08T15:10:27.000Z","size":69,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-22T16:51:25.105Z","etag":null,"topics":["runner","tap","tape","testing"],"latest_commit_sha":null,"homepage":"","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/dhershman1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-08-13T21:11:13.000Z","updated_at":"2021-11-09T03:22:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"d36c7172-dd30-4f44-984d-55a09b9f0d99","html_url":"https://github.com/dhershman1/tapidatcher","commit_stats":{"total_commits":40,"total_committers":1,"mean_commits":40.0,"dds":0.0,"last_synced_commit":"e61763ecf198de4e8c397e551590636f65bcdf75"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dhershman1/tapidatcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhershman1%2Ftapidatcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhershman1%2Ftapidatcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhershman1%2Ftapidatcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhershman1%2Ftapidatcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhershman1","download_url":"https://codeload.github.com/dhershman1/tapidatcher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhershman1%2Ftapidatcher/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263882875,"owners_count":23524579,"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":["runner","tap","tape","testing"],"created_at":"2024-11-12T22:08:43.443Z","updated_at":"2025-07-07T00:05:06.160Z","avatar_url":"https://github.com/dhershman1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tapidatcher\n\n[![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard)\n\nTapidatcher uses [chokidar](https://github.com/paulmillr/chokidar) to watch over source and test file systems, so you can run tests with tape while you write code!\n\n\u003e [Tape](https://github.com/substack/tape) is included as a dependency, so you only need to use tapidatcher when running tests\n\n## Why?\n\nI used [Jest](https://github.com/facebook/jest) a little bit recently, and found that I did enjoy their test watcher setup quite a bit. I prefer to use tape for all my testing needs, but lacked this functionality, so I decided to take a stab at it myself!\n\n## Arguments\n\n- `-v, --version`: Display the current tapidatcher version\n- `-h, --help`: Displays some helpful text for the cli\n- `-c, --config`: Use a config json instead of arguments\n  - Defaults to `tapidatcher.json`\n  - Example: `tapidatcher -c tapi.config.json`\n- `-t, --tests`: The location of your tests folder (if one exists) this is passed directly to [chokidar](https://github.com/paulmillr/chokidar) so any of the methods used in the string can be applied here\n  - Example: `tapidatcher -t tests`\n- `-a, --assume`: Automatically assumes if a file changed is named `index` that it sould use the folder name of this file\n  - Example: `tapidatcher -a`\n- `-s, --src`: The location of your src file (if needed) this is passed directly to [chokidar](https://github.com/paulmillr/chokidar) so any of the methods used in the string can be applied here\n  - Example: `tapidatcher -s src`\n- `-r, --require`: Tell tapidatcher to use requires with tape, similar to `tape -r`\n  - Example: `tapidatcher -r esm`\n  - If using more than one require value split them with commas `-r 'esm,something'`\n- `-e, --ending`: The file name ending used so tapidatcher can tell the difference between tests and source code\n  - This is only required if you are using the `-i` argument\n  - Defaults to `.js` if not set\n  - Example: `tapidatcher -e '.unit.js'`\n- `-p, --pipe`: Tell tapidatcher the pipe command you want to run after tape runs\n  - Example: `tapidatcher -p 'tap-on -u'`\n  - If using more than one pipe value split them with commas `-p 'tap-on -u,something -else'`\n- `-n, --env`: Give a list of env setters to prepend to your test command\n  - Example: `tapidatcher -n 'FORCE_COLOR=1'`\n  - If using more than one env value split them with commas `-n 'FORCE_COLOR=1,ENV=test'`\n- `-i, --initial`: Tells tapidatcher to run the initial tests command\n  - Example: `tapidatcher -i 'npm t'`\n- `-x, --ignore`: Files/folders you want tapidatcher to ignore\n  - Example: `tapidatcher -x 'example.unit.js'`\n  - If using more than one env value split them with commas `-x 'example.unit.js,examples/ignored'`,\n\n\u003e **Important**: You must at least provide a source argument to wath (`-s, --src`)\n\nIf you don't provide the tests argument (`-t, --tests`) then Tapidatcher will assume all of your tests are inline and watch accordingly\n\n## Usage\n\nWhen searching for a test, tapidatcher will attempt to check if the file changed has a corrosponding test name, if the source file name is something like `index.js` and you have the `--assume` argument set, then tapidatcher will attempt to use the folder name of that file as the test name.\n\nYou can use tapidatcher with the arguments, or with a json config. My suggestion is, if you have a lot of ignores/requires/etc then you use the config setup. Argument exists for simple and quick runs\n\nTapiatcher can be used like any other cli tool\n\n```cli\n$ tapidatcher -a -s examples/basic/src -t examples/basic/tests -n 'FORCE_COLOR=1' -p 'tap-on -s' -e .spec.js\n\n$ tapidatcher -i examples/inline -n 'FORCE_COLOR=1' -p 'tap-on' -e .spec.js\n\n$ tapidatcher -s examples/inline -x 'tmp.spec.js,examples/basic' -n 'FORCE_COLOR=1' -p 'tap-on' -e .spec.js\n```\n\n### Using a config.json\n\nOptionally instead of arguments you can use a config json to pass your setup to tapidatcher instead\n\n\u003e **NOTE** using a config will **IGNORE** arguments passed via cli, you should put **all** of the settings in your json\n\nConfig types:\n\n- `tests`: `String`\n- `src`: `String`\n- `ending`: `String`\n- `ignore`: `String[]`\n- `assum`: `Boolean`\n- `pipe`: `String[]`\n- `initial`: `String`\n- `require`: `String[]`\n- `env`: `Object`\n  - `{ name\u003cString\u003e: value\u003cAny\u003e }`\n\nExample config:\n\n```json\n{\n  \"tests\": \"examples/basic/src\",\n  \"src\": \"examples/basic/src\",\n  \"ending\": \".spec.js\",\n  \"ignore\": [\"example.unit.js\", \"examples/ignored\"],\n  \"assume\": true,\n  \"pipe\": [\"tap-on -s\"],\n  \"initial\": \"npm t\",\n  \"require\": [\"esm\"],\n  \"env\": {\n    \"FORCE_COLOR\": 1\n  }\n}\n```\n\n### Using package.json\n\nAlternatively you can put your tapidatcher settings into your `package.json` under the `tapidatcher` key.\n\nThe layout is exactly the same as if you were using the `config` setup.\n\nExample:\n\n```json\n{\n  \"name\": \"basic\",\n  \"version\": \"1.0.0\",\n  \"scripts\": {\n    \"test\": \"\"\n  },\n  \"tapidatcher\": {\n    \"tests\": \"basic/src\",\n    \"src\": \"basic/src\",\n    \"ending\": \".spec.js\",\n    \"ignore\": [\n      \"example.unit.js\",\n      \"ignored\"\n    ],\n    \"assume\": true,\n    \"pipe\": [\n      \"tap-on -s\"\n    ],\n    \"initial\": \"npm run initial\",\n    \"require\": [\n      \"esm\"\n    ],\n    \"env\": {\n      \"FORCE_COLOR\": 1\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhershman1%2Ftapidatcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhershman1%2Ftapidatcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhershman1%2Ftapidatcher/lists"}