Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Jul 19, 2023
1 parent b09b41d commit 2bc35cb
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tests/scenarios/v2-addon-dev-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ appScenarios
],
"plugins": [
"@embroider/addon-dev/template-colocation-plugin",
"@babel/plugin-proposal-class-static-block",
"@babel/plugin-transform-class-static-block",
["babel-plugin-ember-template-compilation", {
targetFormat: 'hbs',
compilerPath: 'ember-source/dist/ember-template-compiler',
Expand Down Expand Up @@ -149,6 +149,7 @@ appScenarios
addon.linkDependency('@embroider/addon-dev', { baseDir: __dirname });
addon.linkDependency('babel-plugin-ember-template-compilation', { baseDir: __dirname });
addon.linkDevDependency('@babel/core', { baseDir: __dirname });
addon.linkDevDependency('@babel/plugin-transform-class-static-block', { baseDir: __dirname });
addon.linkDevDependency('@babel/plugin-transform-class-properties', { baseDir: __dirname });
addon.linkDevDependency('@babel/plugin-proposal-decorators', { baseDir: __dirname });
addon.linkDevDependency('@babel/preset-env', { baseDir: __dirname });
Expand Down Expand Up @@ -181,7 +182,7 @@ appScenarios
test('<SingleFileComponent @message="bob" />', async function(assert) {
await render(hbs\`<SingleFileComponent @message="bob" />\`);
assert.dom().containsText('hello bob');
assert.dom().containsText('Hello bob');
})
test('transform worked', async function (assert) {
Expand Down Expand Up @@ -260,17 +261,14 @@ appScenarios
});

test('gjs components compiled correctly', async function () {
expectFile(
'dist/components/single-file-component.js'
).matches(`import templateOnly from '@ember/component/template-only';
import { setComponentTemplate } from '@ember/component';
expectFile('dist/components/single-file-component.js').equalsCode(`import Component from '@glimmer/component';
import { precompileTemplate } from '@ember/template-compilation';
import Component from '@glimmer/component';
import { setComponentTemplate } from '@ember/component';
class SingleFileComponent extends Component {}
setComponentTemplate(precompileTemplate(\"<div data-test-single-file-component>Hello {{@message}}</div>\", {
strictMode: true
}), templateOnly());
}), SingleFileComponent);
export { SingleFileComponent as default };
//# sourceMappingURL=single-file-component.js.map`);
Expand Down

0 comments on commit 2bc35cb

Please sign in to comment.