nx/e2e/vue/src/vue.test.ts
Jason Jean 396ffc4636
feat(core): enable project crystal by default (#21403)
Co-authored-by: Katerina Skroumpelou <sk.katherine@gmail.com>
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
Co-authored-by: Colum Ferry <cferry09@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Emily Xiong <xiongemi@gmail.com>
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-02-02 03:40:59 -05:00

50 lines
1.3 KiB
TypeScript

import { cleanupProject, newProject, runCLI, uniq } from '@nx/e2e/utils';
describe('Vue Plugin', () => {
let proj: string;
beforeAll(() => {
proj = newProject({
packages: ['@nx/vue'],
unsetProjectNameAndRootFormat: false,
});
});
afterAll(() => cleanupProject());
it('should serve application in dev mode', async () => {
const app = uniq('app');
runCLI(
`generate @nx/vue:app ${app} --unitTestRunner=vitest --e2eTestRunner=playwright`
);
let result = runCLI(`test ${app}`);
expect(result).toContain(`Successfully ran target test for project ${app}`);
result = runCLI(`build ${app}`);
expect(result).toContain(
`Successfully ran target build for project ${app}`
);
// TODO: enable this when tests are passing again.
// if (runE2ETests()) {
// const e2eResults = runCLI(`e2e ${app}-e2e --no-watch`);
// expect(e2eResults).toContain('Successfully ran target e2e');
// expect(await killPorts()).toBeTruthy();
// }
}, 200_000);
it('should build library', async () => {
const lib = uniq('lib');
runCLI(
`generate @nx/vue:lib ${lib} --bundler=vite --unitTestRunner=vitest`
);
const result = runCLI(`build ${lib}`);
expect(result).toContain(
`Successfully ran target build for project ${lib}`
);
});
});