Skip to content

Commit

Permalink
feat(nextjs): can set compiler when setting up `nxComponentTestingPre…
Browse files Browse the repository at this point in the history
…set`

Currently nextjs only uses the *swa* compiler

To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use.

closed #19131
  • Loading branch information
erenken committed Nov 2, 2023
1 parent 4c8c817 commit f1f56dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions e2e/next-extensions/src/next-component-tests.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ describe('NextJs Component Testing', () => {
it('should test a NextJs app using babel compiler', () => {
const appName = uniq('next-app');
createAppWithCt(appName);
// add bable compiler to app
addBabelSupport(`apps/${appName}`);
if (runE2ETests()) {
expect(runCLI(`component-test ${appName} --no-watch`)).toContain(
Expand All @@ -47,6 +48,7 @@ describe('NextJs Component Testing', () => {
it('should test a NextJs lib using babel compiler', async () => {
const libName = uniq('next-lib');
createLibWithCt(libName, false);
// add bable compiler to lib
addBabelSupport(`libs/${libName}`);
if (runE2ETests()) {
expect(runCLI(`component-test ${libName} --no-watch`)).toContain(
Expand Down

0 comments on commit f1f56dc

Please sign in to comment.