Skip to content

Commit

Permalink
test vite beta
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Feb 5, 2025
1 parent 0f6c294 commit 465b724
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/scenarios/vite-internals-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,17 @@ function editBabelConfig(src: string): string {
return src.replace(/babelCompatSupport\(\),/, `babelCompatSupport\(\), 'babel-plugin-is-a-module',`);
}

function runViteInternalsTest(scenario: Scenario) {
function runViteInternalsTest(scenario: Scenario, useViteBeta = false) {
Qmodule(scenario.name, function (hooks) {
let app: PreparedApp;
let server: CommandWatcher;
let appURL: string;

hooks.before(async () => {
app = await scenario.prepare();
if (useViteBeta) {
await app.execute('pnpm install vite@beta');
}
});

Qmodule('vite dev', function (hooks) {
Expand Down Expand Up @@ -345,7 +348,10 @@ tsAppScenarios
.map('vite-internals', app => {
buildViteInternalsTest(true, app);
})
.forEachScenario(runViteInternalsTest);
.forEachScenario((scenario: Scenario) => {
runViteInternalsTest(scenario);
runViteInternalsTest(scenario, true);
});

// After 5.12, there is no non-colocated templates in ember.
tsAppScenarios
Expand Down

0 comments on commit 465b724

Please sign in to comment.