@brightspace-ui/testing 1.18.0 → 1.19.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.18.0",
5
+ "version": "1.19.0",
6
6
  "repository": "https://github.com/BrightspaceUI/testing.git",
7
7
  "scripts": {
8
8
  "lint": "npm run lint:eslint && npm run lint:style",
@@ -120,13 +120,6 @@ async function getTestRunnerOptions(argv = []) {
120
120
  type: Boolean,
121
121
  description: 'Run tests in Webkit',
122
122
  order: 4
123
- },
124
- {
125
- name: 'test-reporting',
126
- type: Boolean,
127
- defaultOption: false,
128
- description: 'Enables generating a D2L Test Reporting format JSON file',
129
- order: 14
130
123
  }
131
124
  ];
132
125
 
@@ -1,4 +1,5 @@
1
1
  import { defaultReporter } from '@web/test-runner';
2
+ import { env } from 'node:process';
2
3
  import { headedMode } from './headed-mode-plugin.js';
3
4
  import { playwrightLauncher } from '@web/test-runner-playwright';
4
5
  import { reporter as testReportingReporter } from 'd2l-test-reporting/reporters/web-test-runner.js';
@@ -6,6 +7,7 @@ import { visualDiff } from './visual-diff-plugin.js';
6
7
  import { visualDiffReporter } from './visual-diff-reporter.js';
7
8
 
8
9
  const DEFAULT_PATTERN = type => `./test/**/*.${type}.js`;
10
+ const DEFAULT_TEST_REPORTING = !!env['CI'];
9
11
  const BROWSER_MAP = {
10
12
  chrome: 'chromium',
11
13
  chromium: 'chromium',
@@ -182,7 +184,7 @@ export class WTRConfig {
182
184
  pattern = DEFAULT_PATTERN,
183
185
  slow,
184
186
  timeout,
185
- testReporting,
187
+ testReporting = DEFAULT_TEST_REPORTING,
186
188
  ...passthroughConfig
187
189
  } = {}) {
188
190
 
@@ -215,8 +217,6 @@ export class WTRConfig {
215
217
  });
216
218
  }
217
219
 
218
- testReporting = !!testReporting || this.#cliArgs['test-reporting'];
219
-
220
220
  if (group === 'vdiff' || testReporting) {
221
221
  config.reporters ??= [ defaultReporter() ];
222
222
  }