Skip to content

Commit

Permalink
all typescript app scenarios only run on versions with ember-native t…
Browse files Browse the repository at this point in the history
…ypes
  • Loading branch information
ef4 committed Jul 1, 2023
1 parent d7ee317 commit 168965b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 31 deletions.
25 changes: 10 additions & 15 deletions tests/scenarios/router-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,24 +226,19 @@ let routerApp = tsAppScenarios.map('router', project => {
});
});

routerApp
// these earlier releases of ember don't offer native types, and we're only
// testing under native types, not third-party types.
.skip('lts_3_28-router')
.skip('lts_4_4-router')
.forEachScenario(scenario => {
Qmodule(scenario.name, function (hooks) {
let app: PreparedApp;
hooks.before(async () => {
app = await scenario.prepare();
});
routerApp.forEachScenario(scenario => {
Qmodule(scenario.name, function (hooks) {
let app: PreparedApp;
hooks.before(async () => {
app = await scenario.prepare();
});

test(`type checks`, async function (assert) {
let result = await app.execute('pnpm tsc');
assert.equal(result.exitCode, 0, result.output);
});
test(`type checks`, async function (assert) {
let result = await app.execute('pnpm tsc');
assert.equal(result.exitCode, 0, result.output);
});
});
});

routerApp.forEachScenario(scenario => {
Qmodule(scenario.name, function (hooks) {
Expand Down
2 changes: 1 addition & 1 deletion tests/scenarios/scenarios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const appScenarios = supportMatrix(Scenarios.fromProject(baseApp));
// we're standardizing on Ember's native types, which become available starting
// at 4.8. So we're not going to run type tests on older releases that don't
// support them.
export const tsAppScenarios = supportMatrix(Scenarios.fromProject(baseTSApp));
export const tsAppScenarios = supportMatrix(Scenarios.fromProject(baseTSApp)).skip('lts_3_28').skip('lts_4_4');

export const dummyAppScenarios = supportMatrix(Scenarios.fromProject(() => baseAddon('dummy-app')));

Expand Down
25 changes: 10 additions & 15 deletions tests/scenarios/typescript-app-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,16 @@ typescriptApp.forEachScenario(scenario => {
});
});

typescriptApp
// these earlier releases of ember don't offer native types, and we're only
// testing under native types, not third-party types.
.skip('lts_3_28-typescript-app')
.skip('lts_4_4-typescript-app')
.forEachScenario(scenario => {
Qmodule(scenario.name, function (hooks) {
let app: PreparedApp;
hooks.before(async () => {
app = await scenario.prepare();
});
typescriptApp.forEachScenario(scenario => {
Qmodule(scenario.name, function (hooks) {
let app: PreparedApp;
hooks.before(async () => {
app = await scenario.prepare();
});

test(`check types`, async function (assert) {
let result = await app.execute(`pnpm tsc`);
assert.equal(result.exitCode, 0, result.output);
});
test(`check types`, async function (assert) {
let result = await app.execute(`pnpm tsc`);
assert.equal(result.exitCode, 0, result.output);
});
});
});

0 comments on commit 168965b

Please sign in to comment.