@vanillaes/esmtk 0.20.1 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,6 +37,18 @@
37
37
  "args": ["test"],
38
38
  "console": "integratedTerminal",
39
39
  },
40
+ {
41
+ "name": "Test - --ignore",
42
+ "type": "node",
43
+ "request": "launch",
44
+ "skipFiles": [
45
+ "<node_internals>/**"
46
+ ],
47
+ "program": "${workspaceFolder}/bin/esmtk.js",
48
+ "cwd": "${workspaceFolder}",
49
+ "args": ["test", "--ignore", "node_modules/**,src/util.spec.js"],
50
+ "console": "integratedTerminal",
51
+ },
40
52
  {
41
53
  "name": "Lint",
42
54
  "type": "node",
package/README.md CHANGED
@@ -50,6 +50,7 @@ Run tests (using Tape-ES)
50
50
  `esmtk test [glob]`
51
51
 
52
52
  - `[glob]` - the glob used to locate test files (default: `**/*.spec.js`)
53
+ - `-i` | `--ignore` - the ignore matcher pattern (default `**/node_modules/**`)
53
54
  - `--watch` - watch for changes to the tests
54
55
 
55
56
  ### Usage
@@ -61,6 +62,9 @@ npx @vanillaes/esmtk test
61
62
  # run the tests (using a different naming scheme)
62
63
  npx @vanillaes/esmtk test **/*.test.js
63
64
 
65
+ # run the tests (ignore tests)
66
+ npx @vanillaes/esmtk test **/*.test.js --ignore **/node_modules/**,src/rm.spec.js
67
+
64
68
  # run the tests (watch for changes)
65
69
  npx @vanillaes/esmtk test --watch
66
70
  ```
@@ -12,6 +12,10 @@ export async function test (glob, options) {
12
12
  if (options?.watch) {
13
13
  args.push('--watch')
14
14
  }
15
+ if (options?.ignore) {
16
+ args.push('--ignore')
17
+ args.push(options.ignore)
18
+ }
15
19
 
16
20
  spawn('node', args, {
17
21
  cwd: process.cwd(),
package/bin/esmtk.js CHANGED
@@ -17,6 +17,7 @@ program.command('init')
17
17
  program.command('test')
18
18
  .description('Run tests using Tape-ES')
19
19
  .argument('[glob]', 'The glob pattern used to find test files', '**/*.spec.js')
20
+ .option('-i, --ignore <ignore>', 'the ignore matcher pattern')
20
21
  .option('--watch', 'Watch the files for changes')
21
22
  .action((glob, options) => {
22
23
  test(glob, options)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vanillaes/esmtk",
3
- "version": "0.20.1",
3
+ "version": "0.21.0",
4
4
  "description": "ES Module Toolkit",
5
5
  "keywords": [
6
6
  "ecmascript",