ember-testem 0.3.2 → 0.4.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
@@ -11,7 +11,7 @@ _Backward- and forward-compatible testing for Ember projects_
11
11
  pnpm add -D ember-testem
12
12
  ```
13
13
 
14
- 2\. Configure `testem` in `testem.mjs`.
14
+ 2\. Configure `testem` in `testem.{mjs,mts}`.
15
15
 
16
16
  ```js
17
17
  export default {
@@ -19,7 +19,7 @@ export default {
19
19
  Chrome: {
20
20
  ci: [
21
21
  // --no-sandbox is needed when running Chrome inside a container
22
- process.env.CI ? '--no-sandbox' : null,
22
+ process.env['CI'] ? '--no-sandbox' : null,
23
23
  '--headless',
24
24
  '--disable-dev-shm-usage',
25
25
  '--disable-software-rasterizer',
@@ -218,12 +218,12 @@ ember-test --port 0
218
218
  >
219
219
  > `ember-testem` provides a limited API on purpose.
220
220
  >
221
- > For `ember-cli` options like `--host`, `--launch`, `--query`, `--reporter`, `--ssl`, `--ssl-cert`, `--ssl-key`, `--test-page`, `--testem-debug`), [configure `testem` in `testem.mjs` instead](https://github.com/ember-cli/ember-cli/blob/v7.3.0-ember-cli/lib/tasks/test.js#L54-L71).
221
+ > For `ember-cli` options like `--host`, `--launch`, `--query`, `--reporter`, `--ssl`, `--ssl-cert`, `--ssl-key`, `--test-page`, `--testem-debug`), [configure `testem` in `testem.{mjs,mts}` instead](https://github.com/ember-cli/ember-cli/blob/v7.3.0-ember-cli/lib/tasks/test.js#L54-L71).
222
222
 
223
223
 
224
224
  ## Compatibility
225
225
 
226
- - Node.js v22 or above
226
+ - Node.js v22.17 or above
227
227
 
228
228
 
229
229
  ## Contributing
@@ -43,12 +43,12 @@ const argv = yargs(hideBin(process.argv))
43
43
  .parseSync();
44
44
  const codemodOptions = {
45
45
  buildPath: argv['path'],
46
- filters: {
47
- filter: argv['filter'],
48
- module: argv['module'],
49
- },
50
46
  port: argv['test-port'] ?? argv['port'],
51
47
  projectRoot: argv['root'] ?? process.cwd(),
48
+ qunit: {
49
+ filter: argv['filter'],
50
+ testModule: argv['module'],
51
+ },
52
52
  server: argv['server'],
53
53
  };
54
54
  void run(codemodOptions);
@@ -1,10 +1,10 @@
1
1
  export function createOptions(codemodOptions) {
2
- const { buildPath, filters, port, projectRoot, server } = codemodOptions;
2
+ const { buildPath, port, projectRoot, qunit, server } = codemodOptions;
3
3
  return {
4
4
  buildPath,
5
- filters,
6
5
  launchBrowser: Boolean(server),
7
6
  port,
8
7
  projectRoot,
8
+ qunit,
9
9
  };
10
10
  }
@@ -2,7 +2,7 @@ import { join } from 'node:path';
2
2
  import Testem from 'testem';
3
3
  import { getQueryParams } from '../../utils/run-tests/get-query-params.js';
4
4
  export async function runTestsInCI(options) {
5
- const { buildPath, filters, port, projectRoot } = options;
5
+ const { buildPath, port, projectRoot } = options;
6
6
  const testemInstance = new Testem();
7
7
  const startOptions = {
8
8
  launch: false,
@@ -13,7 +13,7 @@ export async function runTestsInCI(options) {
13
13
  config_dir: projectRoot,
14
14
  cwd: join(projectRoot, buildPath),
15
15
  parallel: 1,
16
- query_params: getQueryParams(filters),
16
+ query_params: getQueryParams(options),
17
17
  });
18
18
  return new Promise((resolve, reject) => {
19
19
  testemInstance.startCI(startOptions, (exitCode, error) => {
@@ -3,7 +3,7 @@ import { watch } from 'chokidar';
3
3
  import Testem from 'testem';
4
4
  import { getQueryParams } from '../../utils/run-tests/get-query-params.js';
5
5
  export async function runTestsInDev(options) {
6
- const { buildPath, filters, port, projectRoot } = options;
6
+ const { buildPath, port, projectRoot } = options;
7
7
  const testemInstance = new Testem();
8
8
  const startOptions = {
9
9
  launch: false,
@@ -13,11 +13,11 @@ export async function runTestsInDev(options) {
13
13
  ...startOptions,
14
14
  config_dir: projectRoot,
15
15
  cwd: join(projectRoot, buildPath),
16
- query_params: getQueryParams(filters),
16
+ query_params: getQueryParams(options),
17
17
  });
18
18
  const watcher = watch([buildPath], {
19
19
  awaitWriteFinish: true,
20
- usePolling: true,
20
+ backend: 'polling',
21
21
  });
22
22
  watcher.on('change', () => {
23
23
  testemInstance.restart();
@@ -1,10 +1,11 @@
1
- export function getQueryParams(filters) {
1
+ export function getQueryParams(options) {
2
+ const { qunit } = options;
2
3
  const params = [];
3
- if (filters.module) {
4
- params.push(`module=${filters.module}`);
4
+ if (qunit.testModule) {
5
+ params.push(`module=${qunit.testModule}`);
5
6
  }
6
- if (filters.filter) {
7
- params.push(`filter=${filters.filter}`);
7
+ if (qunit.filter) {
8
+ params.push(`filter=${qunit.filter}`);
8
9
  }
9
10
  return params.join('&');
10
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-testem",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Backward- and forward-compatible testing for Ember projects",
5
5
  "keywords": [
6
6
  "ci",
@@ -25,24 +25,24 @@
25
25
  "dist"
26
26
  ],
27
27
  "dependencies": {
28
- "chokidar": "^5.0.0",
29
- "testem": "^3.21.3",
28
+ "chokidar": "^6.0.0",
29
+ "testem": "^4.0.0-beta.1",
30
30
  "yargs": "^18.2.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@codemod-utils/tests": "^3.3.0",
33
+ "@codemod-utils/tests": "^3.3.1",
34
34
  "@shared-configs/eslint-config-node": "0.0.0",
35
35
  "@shared-configs/prettier": "0.0.0",
36
36
  "@shared-configs/typescript": "0.0.0",
37
- "@types/node": "^22.20.4",
37
+ "@types/node": "^22.20.5",
38
38
  "@types/yargs": "^17.0.35",
39
- "concurrently": "^10.0.5",
40
- "eslint": "^10.12.0",
41
- "prettier": "^3.9.9",
39
+ "concurrently": "^10.0.6",
40
+ "eslint": "^10.13.0",
41
+ "prettier": "^3.9.10",
42
42
  "typescript": "^6.0.3"
43
43
  },
44
44
  "engines": {
45
- "node": "22.* || >= 24"
45
+ "node": "^22.17.0 || >= 24"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "sh build.sh --production",