From f1f56dc2bb11c5376953d48965ef4a8d960dfd25 Mon Sep 17 00:00:00 2001 From: Eric Renken Date: Thu, 2 Nov 2023 21:59:30 +0000 Subject: [PATCH] =?UTF-8?q?feat(nextjs):=20can=20set=20compiler=20when=20s?= =?UTF-8?q?etting=20up=20`nxComponentTestingPre=E2=80=A6=20=E2=80=A6set`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- e2e/next-extensions/src/next-component-tests.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/e2e/next-extensions/src/next-component-tests.test.ts b/e2e/next-extensions/src/next-component-tests.test.ts index 2a33b7cfdf587..3f3f10f6b05f7 100644 --- a/e2e/next-extensions/src/next-component-tests.test.ts +++ b/e2e/next-extensions/src/next-component-tests.test.ts @@ -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( @@ -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(