Skip to content

Commit

Permalink
Merge pull request #2175 from embroider-build/adjust-ember-qunit-vers…
Browse files Browse the repository at this point in the history
…ions

Adjust ember-qunit versions in test suite
  • Loading branch information
ef4 authored Nov 15, 2024
2 parents 7195610 + 40f2d0b commit aaeb674
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 42 deletions.
63 changes: 28 additions & 35 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/app-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"ember-load-initializers": "^2.1.2",
"ember-modifier": "^4.1.0",
"ember-page-title": "^7.0.0",
"ember-qunit": "^7.0.0",
"ember-qunit": "^8.0.0",
"ember-resolver": "^10.1.0",
"ember-source": "5.11.0",
"ember-template-lint": "^5.10.1",
Expand Down
22 changes: 20 additions & 2 deletions tests/scenarios/compat-addon-classic-features-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,31 @@ appScenarios
let myAddon = baseAddon();
myAddon.pkg.name = 'my-addon';
merge(myAddon.files, {
'index.js': `
module.exports = {
name: require('./package').name,
included() {
this._super.included.apply(this, arguments);
this.import('vendor/my-addon/test-styles.css', {
type: 'test',
});
}
};
`,
addon: {
styles: {
'addon.css': `
.my-addon-p { color: blue; }
`,
},
},
vendor: {
'my-addon': {
'test-styles.css': `
#example-test-styles { background-color: red }
`,
},
},
});
project.addDependency(myAddon);
})
Expand Down Expand Up @@ -232,7 +250,7 @@ appScenarios
})
);
assert.true(readResult.some(content => content.includes('.my-addon-p{color:#00f}')));
assert.true(readResult.some(content => content.includes('#qunit-tests')));
assert.true(readResult.some(content => content.includes('#example-test-styles')));
});

test('virtual styles are served in dev mode', async function (assert) {
Expand All @@ -246,7 +264,7 @@ appScenarios

response = await fetch(`${url}/@embroider/virtual/test-support.css?direct`);
text = await response.text();
assert.true(text.includes('#qunit-tests'));
assert.true(text.includes('#example-test-styles'));
} finally {
await server.shutdown();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/scenarios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"ember-inline-svg": "^0.2.1",
"ember-modifier": "^4.0.0",
"ember-page-title": "^8.2.3",
"ember-qunit-7": "npm:ember-qunit@^7.0.0",
"ember-qunit-6": "npm:ember-qunit@^6.0.0",
"ember-source": "~3.28.11",
"ember-source-4.12": "npm:ember-source@~4.12.0",
"ember-source-4.4": "npm:ember-source@~4.4.0",
Expand Down
4 changes: 1 addition & 3 deletions tests/scenarios/scenarios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export async function lts_3_28(project: Project) {
project.linkDevDependency('ember-cli', { baseDir: __dirname, resolveName: 'ember-cli' });
project.linkDevDependency('ember-data', { baseDir: __dirname, resolveName: 'ember-data-latest' });
project.linkDevDependency('@ember/test-helpers', { baseDir: __dirname, resolveName: 'ember-test-helpers-2' });
project.linkDevDependency('ember-qunit', { baseDir: __dirname, resolveName: 'ember-qunit-6' });
}

async function lts_4_4(project: Project) {
Expand Down Expand Up @@ -47,7 +48,6 @@ async function release(project: Project) {
project.linkDevDependency('ember-cli', { baseDir: __dirname, resolveName: 'ember-cli-latest' });
project.linkDevDependency('ember-data', { baseDir: __dirname, resolveName: 'ember-data-latest' });
project.linkDevDependency('@ember/test-waiters', { baseDir: __dirname, resolveName: '@ember/test-waiters' });
project.linkDevDependency('ember-qunit', { baseDir: __dirname, resolveName: 'ember-qunit-7' });
project.linkDevDependency('ember-cli-babel', { baseDir: __dirname, resolveName: 'ember-cli-babel-latest' });
project.linkDevDependency('@babel/core', { baseDir: __dirname });
}
Expand All @@ -56,7 +56,6 @@ async function beta(project: Project) {
project.linkDevDependency('ember-source', { baseDir: __dirname, resolveName: 'ember-source-beta' });
project.linkDevDependency('ember-cli', { baseDir: __dirname, resolveName: 'ember-cli-beta' });
project.linkDevDependency('ember-data', { baseDir: __dirname, resolveName: 'ember-data-latest' });
project.linkDevDependency('ember-qunit', { baseDir: __dirname, resolveName: 'ember-qunit-7' });
project.linkDevDependency('ember-cli-babel', { baseDir: __dirname, resolveName: 'ember-cli-babel-latest' });
project.linkDevDependency('@babel/core', { baseDir: __dirname });
}
Expand All @@ -65,7 +64,6 @@ async function canary(project: Project) {
project.linkDevDependency('ember-source', { baseDir: __dirname, resolveName: 'ember-source-canary' });
project.linkDevDependency('ember-cli', { baseDir: __dirname, resolveName: 'ember-cli-beta' });
project.linkDevDependency('ember-data', { baseDir: __dirname, resolveName: 'ember-data-latest' });
project.linkDevDependency('ember-qunit', { baseDir: __dirname, resolveName: 'ember-qunit-7' });
project.linkDevDependency('ember-cli-babel', { baseDir: __dirname, resolveName: 'ember-cli-babel-latest' });
}

Expand Down

0 comments on commit aaeb674

Please sign in to comment.