Skip to content

Commit

Permalink
cleanup(bundling): cleanup vite e2e test (#13220)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Nov 17, 2022
1 parent 2802b6f commit 945fc73
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions e2e/vite/src/vite.test.ts
Expand Up @@ -3,6 +3,7 @@ import {
createFile,
killPorts,
newProject,
promisifiedTreeKill,
readFile,
rmDist,
runCLI,
Expand Down Expand Up @@ -131,20 +132,21 @@ describe('Vite Plugin', () => {
rmDist();
}, 200000);

describe('serve using Vite', () => {
afterEach(() => killPorts());

it('should serve applications in dev mode', async () => {
const port = 4212;
const p = await runCommandUntil(
`run ${myApp}:serve --port=${port}`,
(output) => {
return output.includes('Local:');
}
);
p.kill();
}, 200000);
});
it('should serve applications in dev mode', async () => {
const port = 4212;
const p = await runCommandUntil(
`run ${myApp}:serve --port=${port}`,
(output) => {
return output.includes('Local:');
}
);
try {
await promisifiedTreeKill(p.pid, 'SIGKILL');
await killPorts(port);
} catch {
// ignore
}
}, 200000);

it('should test applications', async () => {
const result = await runCLIAsync(`test ${myApp}`);
Expand Down

0 comments on commit 945fc73

Please sign in to comment.