Skip to content

Commit f9dbcfe

Browse files
committed
Use setTesting
1 parent 2128af4 commit f9dbcfe

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

files/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@embroider/addon-dev": "^8.1.0",
4747
"@embroider/compat": "^4.1.0",
4848
"@embroider/core": "^4.1.0",
49-
"@embroider/macros": "^1.18.0",
49+
"@embroider/macros": "^1.20.0",
5050
"@embroider/vite": "^1.1.5",
5151
"@eslint/js": "^9.17.0",
5252
"@glimmer/component": "^2.0.0<% if (typescript) { %>",

files/tests/test-helper.__ext__

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import * as QUnit from 'qunit';
44
import { setApplication } from '@ember/test-helpers';
55
import { setup } from 'qunit-dom';
66
import { start as qunitStart, setupEmberOnerrorValidation } from 'ember-qunit';
7-
<% if (typescript) { %>// @ts-expect-error @embroider/macros does not provide types
8-
<% } %>import { getGlobalConfig } from '@embroider/macros/src/addon/runtime';
7+
import { setTesting } from '@embroider/macros';
98

109
class Router extends EmberRouter {
1110
location = 'none';
@@ -23,14 +22,7 @@ class TestApp extends EmberApp {
2322
Router.map(function () {});
2423

2524
export function start() {
26-
<% if (typescript) { %>// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
27-
<% } %>const theMacrosGlobal = getGlobalConfig();
28-
29-
<% if (typescript) { %>// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
30-
<% } %>theMacrosGlobal['@embroider/macros'] ||= {};
31-
<% if (typescript) { %>// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
32-
<% } %>theMacrosGlobal['@embroider/macros'].isTesting ||= true;
33-
25+
setTesting(true);
3426
setApplication(
3527
TestApp.create({
3628
autoboot: false,

0 commit comments

Comments
 (0)