Skip to content

Commit

Permalink
feat: remove test dep
Browse files Browse the repository at this point in the history
  • Loading branch information
hongaar authored Sep 24, 2023
1 parent 2e5c394 commit 645a0f0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 401 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,9 @@ this by setting the `private` property in `package.json` to `false`.
_Scope: repo or workspace_
This plugin enables testing with the [test](https://www.npmjs.com/package/test)
package, which is a port of the native
[node:test](https://nodejs.org/api/test.html) which is only available in Node
≥ 18. It uses [tap](https://node-tap.org) for formatting the TAP output.
This plugin enables testing with the native
[node --test](https://nodejs.org/api/test.html) functionality. It uses
[tap](https://node-tap.org) for formatting the TAP output.
When the `typescript` plugin is also installed, it will use
[ts-node](https://typestrong.org/ts-node/) to load TypeScript test files.
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"clean": "rm -rf dist && rm -rf types",
"prepublish": "yarn build && cp ../../README.md .",
"start": "node moker.js",
"test": "NODE_OPTIONS='--loader=ts-node/esm --no-warnings' node--test test/*.test.ts | NODE_OPTIONS='--loader=ts-node/esm --no-warnings' tap --no-coverage"
"test": "NODE_OPTIONS='--loader=ts-node/esm --no-warnings' node --test test/*.test.ts | NODE_OPTIONS='--loader=ts-node/esm --no-warnings' tap --no-coverage"
},
"dependencies": {
"@mokr/core": "workspace:*",
Expand Down
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"build:watch": "tsc --watch",
"clean": "rm -rf dist && rm -rf types",
"prepublish": "yarn build",
"test": "NODE_OPTIONS='--loader=ts-node/esm --no-warnings' node--test test/*.test.ts | NODE_OPTIONS='--loader=ts-node/esm --no-warnings' tap --no-coverage"
"test": "NODE_OPTIONS='--loader=ts-node/esm --no-warnings' node --test test/*.test.ts | NODE_OPTIONS='--loader=ts-node/esm --no-warnings' tap --no-coverage"
},
"dependencies": {
"chalk": "5.3.0",
Expand All @@ -34,7 +34,6 @@
"@types/node": "20.6.2",
"tap": "16.3.8",
"tempy": "3.1.0",
"test": "3.3.0",
"ts-node": "10.9.1",
"typescript": "5.2.2"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/plugins/src/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function install({ directory }: PluginArgs) {
directory,
data: {
scripts: {
test: "node--test | tap --no-coverage",
test: "node --test | tap --no-coverage",
},
},
});
Expand All @@ -38,7 +38,7 @@ async function install({ directory }: PluginArgs) {
directory,
data: {
scripts: {
test: "NODE_OPTIONS='--loader=ts-node/esm --no-warnings' node--test test/*.test.ts | NODE_OPTIONS='--loader=ts-node/esm --no-warnings' tap --no-coverage",
test: "NODE_OPTIONS='--loader=ts-node/esm --no-warnings' node --test test/*.test.ts | NODE_OPTIONS='--loader=ts-node/esm --no-warnings' tap --no-coverage",
},
},
});
Expand All @@ -57,7 +57,7 @@ async function install({ directory }: PluginArgs) {
}

async function remove({ directory }: PluginArgs) {
enqueueRemoveDependency({ directory, identifier: ["test", "ts-node"] });
enqueueRemoveDependency({ directory, identifier: ["tap", "ts-node"] });

warning("Please review package.json manually");
}
Expand Down
Loading

0 comments on commit 645a0f0

Please sign in to comment.