Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test vite beta #2251

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading