@brightspace-ui/testing 1.7.0 → 1.8.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/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.7.0",
5
+ "version": "1.8.0",
6
6
  "repository": "https://github.com/BrightspaceUI/testing.git",
7
7
  "scripts": {
8
8
  "lint": "eslint . --ext .js",
@@ -78,7 +78,7 @@ export async function reset(opts = {}) {
78
78
  }
79
79
 
80
80
  opts.lang ??= '';
81
- if (documentLocaleSettings.lamguage !== opts.lang) {
81
+ if (documentLocaleSettings.language !== opts.lang) {
82
82
  document.documentElement.lang = opts.lang;
83
83
  awaitNextFrame = true;
84
84
  }
@@ -133,7 +133,7 @@ async function getTestRunnerOptions(argv = []) {
133
133
  },
134
134
  {
135
135
  header: 'Usage',
136
- content: 'd2l-test-runner [options]\nd2l-test-runner <command> [options]\n',
136
+ content: 'd2l-test-runner [options]\nd2l-test-runner <group> [options]\nd2l-test-runner <command> [options]\n',
137
137
  },
138
138
  {
139
139
  header: 'Options',
@@ -174,10 +174,6 @@ export class WTRConfig {
174
174
  const { files, filter, golden, grep, group, open, watch } = this.#cliArgs;
175
175
  const passthroughGroupNames = passthroughConfig.groups?.map(g => g.name) ?? [];
176
176
 
177
- if (!['test', 'vdiff', ...passthroughGroupNames].includes(group)) {
178
- return {}; // allow wtr to error
179
- }
180
-
181
177
  delete passthroughConfig.browsers;
182
178
 
183
179
  if (typeof pattern !== 'function') throw new TypeError('pattern must be a function');
@@ -189,6 +185,15 @@ export class WTRConfig {
189
185
  ...passthroughConfig
190
186
  };
191
187
 
188
+ if (!['test', 'vdiff', ...passthroughGroupNames].includes(group)) {
189
+ config.groups.push({ name: group, files: this.#pattern });
190
+ } else {
191
+ const groupConfig = config.groups.find(g => g.name === group);
192
+ if (groupConfig) {
193
+ groupConfig.files = this.#pattern;
194
+ }
195
+ }
196
+
192
197
  if (filter) {
193
198
  config.groups.forEach(group => {
194
199
  group.files = this.#filterFiles([ group.files ].flat());