@brightspace-ui/testing 1.41.0 → 1.42.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.
package/README.md CHANGED
@@ -424,7 +424,7 @@ Use the `d2l-test-runner` binary to execute a set of tests and report their resu
424
424
  | timeout | `Number` | `2000` | Test timeout threshold in ms |
425
425
  | filter | `String` | | Filter test files by replacing wildcards with this glob |
426
426
  | grep | `String` | | Only run tests matching this string or regexp |
427
- | files | `String` | `'./test/**/*.<group>.js'` | Test files to run. Path or glob. |
427
+ | files | `String` | `'./**/test/**/*.<group>.js'` | Test files to run. Path or glob. |
428
428
  | config | `String` | `'./d2l-test-runner.config.js'` | Location of config file |
429
429
  | watch | `Boolean` | `false` | Reload tests on file changes. Allows debugging in all browsers. |
430
430
  | open | `Boolean` | `false` | Open the browser in headed mode |
@@ -461,9 +461,9 @@ export default {
461
461
 
462
462
  Tests are organized into groups, which can be configured and run together.
463
463
 
464
- The group name appears in the default `files` pattern (`'./test/**/*.<group>.js'`), making it typical for test files to have the group name as part of their extension. For example, the default group is `'test'` so all test files named `*.test.js` will belong to it by default. Similarly, the `vdiff` group contains files named `*.vdiff.js`.
464
+ The group name appears in the default `files` pattern (`'./**/test/**/*.<group>.js'`), making it typical for test files to have the group name as part of their extension. For example, the default group is `'test'` so all test files named `*.test.js` will belong to it by default. Similarly, the `vdiff` group contains files named `*.vdiff.js`.
465
465
 
466
- To run tests which match the pattern `'./test/**/*.mygroup.js'`:
466
+ To run tests which match the pattern `'./**/test/**/*.mygroup.js'`:
467
467
  ```bash
468
468
  d2l-test-runner --group mygroup
469
469
  ```
@@ -488,9 +488,9 @@ While writing or debugging tests, it can be desirable to focus the runner on a s
488
488
 
489
489
  Use the `filter` option to filter by file name. It replaces any wildcards in the file name portion of the `files` pattern with the provided [glob](https://en.wikipedia.org/wiki/Glob_(programming)).
490
490
 
491
- For example, with the `'test'` group and default pattern `'./test/**/*.<group>.js'`, passing `d2l-test-runner --filter foo` will run tests which match `'./test/**/foo.test.js'`.
491
+ For example, with the `'test'` group and default pattern `'./**/test/**/*.<group>.js'`, passing `d2l-test-runner --filter foo` will run tests which match `'./**/test/**/foo.test.js'`.
492
492
 
493
- Wildcards can still be used but need to be escaped. So `d2l-test-runner --filter foo\*` will run tests which match `'./test/**/foo*.test.js'`.
493
+ Wildcards can still be used but need to be escaped. So `d2l-test-runner --filter foo\*` will run tests which match `'./**/test/**/foo*.test.js'`.
494
494
 
495
495
  ### By Test Name
496
496
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@brightspace-ui/testing",
3
3
  "description": "Utilities for testing front-end components and applications",
4
4
  "type": "module",
5
- "version": "1.41.0",
5
+ "version": "1.42.0",
6
6
  "repository": "https://github.com/BrightspaceUI/testing.git",
7
7
  "scripts": {
8
8
  "lint": "npm run lint:eslint && npm run lint:style",
@@ -16,7 +16,7 @@ async function getTestRunnerOptions(argv = []) {
16
16
  name: 'files',
17
17
  type: String,
18
18
  multiple: true,
19
- description: 'Test files to run. Path or glob.\n[Default: ./test/**/*.<group>.js]',
19
+ description: 'Test files to run. Path or glob.\n[Default: ./**/test/**/*.<group>.js]',
20
20
  order: 8
21
21
  },
22
22
  {
@@ -35,7 +35,7 @@ const defaultReporterGrep = () => {
35
35
  };
36
36
  };
37
37
 
38
- const DEFAULT_PATTERN = type => `./test/**/*.${type}.js`;
38
+ const DEFAULT_PATTERN = type => `./**/test/**/*.${type}.js`;
39
39
  const DEFAULT_TEST_REPORTING = !!env['CI'];
40
40
  const BROWSER_MAP = {
41
41
  chrome: 'chromium',