|
| 1 | +import { |
| 2 | + checkFilesExist, |
| 3 | + ensureNxProject, |
| 4 | + readJson, |
| 5 | + runNxCommandAsync, |
| 6 | + uniq, |
| 7 | +} from '@nrwl/nx-plugin/testing'; |
| 8 | + |
| 9 | +import { |
| 10 | + runCommandUntil, |
| 11 | + promisifiedTreeKill, |
| 12 | + killPort, |
| 13 | +} from '@qwikifiers/e2e/utils'; |
| 14 | + |
| 15 | +describe('appGenerator e2e', () => { |
| 16 | + // Setting up individual workspaces per |
| 17 | + // test can cause e2e runs to take a long time. |
| 18 | + // For this reason, we recommend each suite only |
| 19 | + // consumes 1 workspace. The tests should each operate |
| 20 | + // on a unique project in the workspace, such that they |
| 21 | + // are not dependant on one another. |
| 22 | + beforeAll(() => { |
| 23 | + ensureNxProject('qwik-nx', 'dist/packages/qwik-nx'); |
| 24 | + }); |
| 25 | + |
| 26 | + afterAll(async () => { |
| 27 | + // `nx reset` kills the daemon, and performs |
| 28 | + // some work which can help clean up e2e leftovers |
| 29 | + await runNxCommandAsync('reset'); |
| 30 | + }); |
| 31 | + |
| 32 | + describe("qwik-nx's compiled package.json", () => { |
| 33 | + let project: string; |
| 34 | + // beforeAll(async () => { |
| 35 | + // project = uniq('qwik-nx'); |
| 36 | + // await runNxCommandAsync( |
| 37 | + // `generate qwik-nx:app ${project} --no-interactive` |
| 38 | + // ); |
| 39 | + // }, 200000); |
| 40 | + |
| 41 | + it("qwik-nx's package.json should contain only expected dependencies", async () => { |
| 42 | + const packageJson = readJson('node_modules/qwik-nx/package.json'); |
| 43 | + |
| 44 | + expect(packageJson.dependencies).toEqual({ |
| 45 | + '@nrwl/vite': '15.6.1', |
| 46 | + }); |
| 47 | + expect(packageJson.peerDependencies).toEqual({ |
| 48 | + '@builder.io/qwik': '^0.16.0', |
| 49 | + '@playwright/test': '^1.30.0', |
| 50 | + undici: '^5.18.0', |
| 51 | + vite: '^4.0.0', |
| 52 | + vitest: '^0.25.0', |
| 53 | + tslib: '2.4.1', |
| 54 | + }); |
| 55 | + }, 200000); |
| 56 | + }); |
| 57 | +}); |
0 commit comments