{"id":19124389,"url":"https://github.com/scramjetorg/nodeunit-tape-compat","last_synced_at":"2025-05-05T19:21:47.305Z","repository":{"id":42235801,"uuid":"138642991","full_name":"scramjetorg/nodeunit-tape-compat","owner":"scramjetorg","description":"Run nodeunit test cases with much faster and actively developed tape.","archived":false,"fork":false,"pushed_at":"2023-11-30T15:15:39.000Z","size":885,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-05-05T19:21:32.952Z","etag":null,"topics":["javascript","node-js","nodejs","nodeunit","tape","unit-test"],"latest_commit_sha":null,"homepage":null,"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/scramjetorg.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-25T19:53:51.000Z","updated_at":"2021-12-13T13:07:17.000Z","dependencies_parsed_at":"2023-11-30T16:31:07.248Z","dependency_job_id":"0cc59828-8026-47a2-a746-fb418eea6df4","html_url":"https://github.com/scramjetorg/nodeunit-tape-compat","commit_stats":{"total_commits":202,"total_committers":3,"mean_commits":67.33333333333333,"dds":"0.14851485148514854","last_synced_commit":"e9cc0e818c5bea2e098f94c9c8748fa375ada722"},"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scramjetorg%2Fnodeunit-tape-compat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scramjetorg%2Fnodeunit-tape-compat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scramjetorg%2Fnodeunit-tape-compat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scramjetorg%2Fnodeunit-tape-compat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scramjetorg","download_url":"https://codeload.github.com/scramjetorg/nodeunit-tape-compat/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252561073,"owners_count":21768065,"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":["javascript","node-js","nodejs","nodeunit","tape","unit-test"],"created_at":"2024-11-09T05:28:58.216Z","updated_at":"2025-05-05T19:21:47.261Z","avatar_url":"https://github.com/scramjetorg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nodeunit-tape-compat\n\nA [`nodeunit`](https://npmjs.com/package/nodeunit) compatible runner based on [`tape`](https://npmjs.com/package/tape) for lazy people like me that don't want to review 1000 files and change two function signatures in every one...\n\nSimply take your `nodeunit` files and this will run your tests with tape, removing legacy dependencies on non supported `nodeunit`.\n\nIf this is not fully compatible with nodeunit, please open an issue with an example test.\n\n## Usage\n\nFrom command line:\n\n```bash\n# -- with global install --\nnpm i -g nodeunit-tape-compat\nnodeunit-tape \u003cpath-to-file\u003e \u003cpath-to-file\u003e\n# -- or simply --\nnpx nodeunit-tape-compat \u003cpath-to-file\u003e \u003cpath-to-file\u003e [-t]\n```\n\nThe `-t` flag runs only methods starting with \"test\".\n\nIn package JSON (remember to `npm i -D nodeunit-tape-compat`):\n\n```json\n    \"test\": \"nodeunit-tape ./test/**/*.js\"\n```\n\nFrom node.js:\n\n```javascript\nconst { DataStream } = require('scramjet');\nconst gs = require('glob-stream');\nconst tapeRunner = require('nodeunit-tape-compat');\n\ntapeRunner.from(gs(process.argv.slice(2)))\n    .run()\n    .then(() =\u003e {\n        console.error(\"✔ Tests succeeded.\");\n    })\n    .catch(() =\u003e {\n        console.error(\"✘ Some tests failed.\");\n        process.exit(1);\n    });\n```\n\n## API\n\n### As a module\n\nmodule.exports = [scramjet module](https://github.com/scramjetorg/scramjet/blob/master/docs/data-stream.md#DataStream+use)\n\nTo be used on a [`scramjet`](https://www.npmjs.com/package/scramjet/) stream of files like this:\n\n```javascript\n    DataStream\n        .from(gs(process.argv.slice(2)))\n        .use('nodeunit-tape-compat')\n        // do something with the stream of tests\n        .pipe(process.stdout)\n    ;\n```\n\n### Methods:\n\n* `async from(Readable stream) : void` consumes a stream of [file objects](#File_object)\n* `flattenTests(Object.\u003cString,Object|AsyncFunction\u003e) : Object.\u003cString,AsyncFunction\u003e` DataStream mapper that flattens the nested test objects to a simple hash of test cases.\n* `runTests(Object.\u003cString,AsyncFunction\u003e)` DataStream mapper that runs the tests asynchronously and returns the results.\n\n### File object\n\nA file object is meant to be generally compatible with `fs.stat` and `VinylFS`.\n\nProperties:\n\n* `path` - path to the file containing tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscramjetorg%2Fnodeunit-tape-compat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscramjetorg%2Fnodeunit-tape-compat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscramjetorg%2Fnodeunit-tape-compat/lists"}