Skip to content

Commit 893669c

Browse files
authored
Merge pull request #430 from alexlafroscia/embroider-test-setup
Configure `@embroider/test-setup`
2 parents f536568 + 41896f6 commit 893669c

File tree

5 files changed

+66
-120
lines changed

5 files changed

+66
-120
lines changed

config/ember-try.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const getChannelURL = require('ember-source-channel-url');
4+
const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');
45

56
module.exports = async function () {
67
return {
@@ -89,6 +90,8 @@ module.exports = async function () {
8990
},
9091
command: 'tsc',
9192
},
93+
embroiderSafe(),
94+
embroiderOptimized(),
9295
],
9396
};
9497
};

ember-cli-build.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
4+
const { maybeEmbroider } = require('@embroider/test-setup');
45
const urls = require('./lib/prember-urls');
56

67
module.exports = function (defaults) {
@@ -47,5 +48,5 @@ module.exports = function (defaults) {
4748
behave. You most likely want to be modifying `./index.js` or app's build file
4849
*/
4950

50-
return app.toTree();
51+
return maybeEmbroider(app);
5152
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"@ember/jquery": "^0.6.1",
2323
"@ember/optional-features": "^2.0.0",
2424
"@ember/test-helpers": "^2.2.3",
25-
"@embroider/macros": "^0.10.0",
25+
"@embroider/macros": "^0.41.0",
26+
"@embroider/test-setup": "^0.41.0",
2627
"@glimmer/component": "^1.0.2",
2728
"@glimmer/tracking": "^1.0.2",
2829
"@types/ember": "^3.16.0",

tests/integration/no-render-breaking-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ module('Integration | no render breaking', function (hooks) {
3838
);
3939

4040
await render(hbs`
41-
{{#macroIf (macroDependencySatisfies "ember-source" ">= 3.15.0")}}
41+
{{#if (macroCondition (macroDependencySatisfies "ember-source" ">= 3.15.0"))}}
4242
<ECTest {{autofocus}} />
43-
{{/macroIf}}
43+
{{/if}}
4444
`);
4545
assert.ok(true, 'Renders');
4646
});

0 commit comments

Comments
 (0)