diff --git a/e2e/qwik-nx-e2e/tests/__snapshots__/application.spec.ts.snap b/e2e/qwik-nx-e2e/tests/__snapshots__/application.spec.ts.snap deleted file mode 100644 index df934ad..0000000 --- a/e2e/qwik-nx-e2e/tests/__snapshots__/application.spec.ts.snap +++ /dev/null @@ -1,33 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`appGenerator e2e Basic behavior with app generator should run type checking before the build step: stderr 1`] = `""`; - -exports[`appGenerator e2e Basic behavior with app generator should run type checking before the build step: stdout 1`] = ` -" -> nx run PROJECT_NAME:build - - >  NX  Running type check for the \\"PROJECT_NAME\\".. - npx tsc --incremental --noEmit --pretty -p REPLACED_PATH/tsconfig.app.json -LIB_PROJECT_NAME/src/lib/LIB_PROJECT_NAME.tsx:7:22 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -7 b.push(1); -   ~ -PROJECT_NAME/src/routes/index.tsx:8:15 - error TS2322: Type 'string' is not assignable to type 'number'. -8 a = 'not-a-number'; -   ~ -Found 2 errors in 2 files. -Errors Files - 1 LIB_PROJECT_NAME/src/lib/LIB_PROJECT_NAME.tsx:7 - 1 PROJECT_NAME/src/routes/index.tsx:8 - - - - > NX Running target build for project PROJECT_NAME failed - - Failed tasks: - - - PROJECT_NAME:build - - Hint: run the command with --verbose for more details. - -" -`; diff --git a/e2e/qwik-nx-e2e/tests/__snapshots__/preset.spec.ts.snap b/e2e/qwik-nx-e2e/tests/__snapshots__/preset.spec.ts.snap deleted file mode 100644 index 9dcd61e..0000000 --- a/e2e/qwik-nx-e2e/tests/__snapshots__/preset.spec.ts.snap +++ /dev/null @@ -1,33 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`presetGenerator e2e Basic behavior with preset generator should run type checking before the build step: stderr 1`] = `""`; - -exports[`presetGenerator e2e Basic behavior with preset generator should run type checking before the build step: stdout 1`] = ` -" -> nx run PROJECT_NAME:build - - >  NX  Running type check for the \\"PROJECT_NAME\\".. - npx tsc --incremental --noEmit --pretty -p REPLACED_PATH/tsconfig.app.json -apps/PROJECT_NAME/src/routes/index.tsx:8:15 - error TS2322: Type 'string' is not assignable to type 'number'. -8 a = 'not-a-number'; -   ~ -libs/LIB_PROJECT_NAME/src/lib/LIB_PROJECT_NAME.tsx:7:22 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -7 b.push(1); -   ~ -Found 2 errors in 2 files. -Errors Files - 1 apps/PROJECT_NAME/src/routes/index.tsx:8 - 1 libs/LIB_PROJECT_NAME/src/lib/LIB_PROJECT_NAME.tsx:7 - - - - > NX Running target build for project PROJECT_NAME failed - - Failed tasks: - - - PROJECT_NAME:build - - Hint: run the command with --verbose for more details. - -" -`; diff --git a/e2e/qwik-nx-e2e/tests/application-basic-behavior.suite.ts b/e2e/qwik-nx-e2e/tests/application-basic-behavior.suite.ts index 096c6db..7254e4f 100644 --- a/e2e/qwik-nx-e2e/tests/application-basic-behavior.suite.ts +++ b/e2e/qwik-nx-e2e/tests/application-basic-behavior.suite.ts @@ -147,8 +147,16 @@ export function testApplicationBasicBehavior(generator: 'app' | 'preset') { .replace(/-p .+/, '-p REPLACED_PATH/tsconfig.app.json'); } - expect(replaceDynamicContent(result.stderr)).toMatchSnapshot('stderr'); - expect(replaceDynamicContent(result.stdout)).toMatchSnapshot('stdout'); + const stdout = replaceDynamicContent(stripConsoleColors(result.stdout)); + expect(stdout).toContain( + `PROJECT_NAME/src/routes/index.tsx:8:15 - error TS2322: Type 'string' is not assignable to type 'number'.` + ); + expect(stdout).toContain( + `LIB_PROJECT_NAME/src/lib/LIB_PROJECT_NAME.tsx:7:22 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.` + ); + expect(stdout).toContain( + `Running target build for project PROJECT_NAME failed` + ); }, DEFAULT_E2E_TIMEOUT );