fix(ci): exclusion regex now actually works instead of ignoring all tests (#58259)

This commit is contained in:
Leah 2023-11-09 21:43:35 +01:00 committed by GitHub
parent 8eba72f30b
commit 25bc6afa1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 98 additions and 78 deletions

View file

@ -435,7 +435,7 @@ ${ENDGROUP}`)
? []
: [
'--testNamePattern',
`^(?!${test.excludedCases.map(escapeRegexp).join('|')})$`,
`^(?!(?:${test.excludedCases.map(escapeRegexp).join('|')})$).`,
]),
]
const env = {

View file

@ -33,11 +33,17 @@ const SKIPPED_TEST_SUITES = {
'ReactRefreshRequire app propagates a hot update to closest accepted module',
'ReactRefreshRequire app propagates hot update to all inverse dependencies',
],
'test/development/acceptance/ReactRefreshLogBox.test.ts': [
'ReactRefreshLogBox turbo conversion to class component (1)',
],
'test/development/acceptance/ReactRefreshRequire.test.ts': [
'ReactRefreshRequire re-runs accepted modules',
'ReactRefreshRequire propagates a hot update to closest accepted module',
'ReactRefreshRequire propagates hot update to all inverse dependencies',
],
'test/development/basic/hmr.test.ts': [
'basic HMR, basePath: "/docs" Error Recovery should show the error on all pages',
],
'test/development/jsconfig-path-reloading/index.test.ts': [
/should automatically fast refresh content when path is added without error/,
/should recover from module not found when paths is updated/,
@ -45,6 +51,20 @@ const SKIPPED_TEST_SUITES = {
'test/development/tsconfig-path-reloading/index.test.ts': [
/should automatically fast refresh content when path is added without error/,
],
'test/e2e/app-dir/app-css/index.test.ts': [
'app dir - css css support server layouts should support external css imports',
],
'test/e2e/app-dir/metadata/metadata.test.ts': [
'app dir - metadata file based icons should handle updates to the file icon name and order',
'app dir - metadata react cache should have same title and page value on initial load',
'app dir - metadata react cache should have same title and page value when navigating',
'app dir - metadata static routes should have icons as route',
'app dir - metadata twitter should render twitter card summary when image is not present',
'app dir - metadata twitter should support default twitter app card',
'app dir - metadata twitter should support default twitter player card',
'app dir - metadata twitter should support twitter card summary_large_image when image present',
'app dir - metadata viewport should support dynamic viewport export',
],
'test/e2e/basepath.test.ts': [
'basePath should 404 when manually adding basePath with router.push',
'basePath should 404 when manually adding basePath with router.replace',
@ -58,12 +78,17 @@ const SKIPPED_TEST_SUITES = {
'test/integration/app-document-remove-hmr/test/index.test.js': [
'_app removal HMR should HMR when _document is removed',
],
'test/integration/app-document/test/index.test.js': [
'Document and App Client side should detect the changes to pages/_app.js and display it',
'Document and App Client side should detect the changes to pages/_document.js and display it',
],
'test/integration/css/test/css-modules.test.js': [
'CSS Modules Composes Ordering Development Mode should have correct color on index page (on nav from other)',
'CSS Modules Composes Ordering Development Mode should have correct color on index page (on nav from index)',
],
'test/integration/custom-error/test/index.test.js': [/Custom _error/],
'test/integration/dynamic-routing/test/index.test.js': [
'Dynamic Routing dev mode should work with HMR correctly',
'Dynamic Routing production mode should have correct cache entries on prefetch',
'Dynamic Routing production mode should render dynamic route with query',
],
@ -71,19 +96,13 @@ const SKIPPED_TEST_SUITES = {
'Dynamic Routing dev mode should resolve dynamic route href for page added later',
'Dynamic Routing production mode should output a routes-manifest correctly',
],
'test/integration/import-assertion/test/index.test.js': [
/should handle json assertions/,
],
'test/integration/env-config/test/index.test.js': [
'Env Config dev mode with hot reload should provide env for SSG',
'Env Config dev mode with hot reload should provide env correctly for SSR',
'Env Config dev mode with hot reload should provide env correctly for API routes',
],
'test/integration/app-document/test/index.test.js': [
'Document and App Client side should detect the changes to pages/_document.js and display it',
],
'test/development/basic/hmr.test.ts': [
'basic HMR, basePath: "/docs" Error Recovery should show the error on all pages',
'test/integration/import-assertion/test/index.test.js': [
/should handle json assertions/,
],
}

View file

@ -530,12 +530,8 @@
},
"packages/next/src/server/future/normalizers/request/base-path.test.ts": {
"passed": [
"BasePathPathnameNormalizer match should return false if the pathname does not start with the basePath",
"BasePathPathnameNormalizer match should return false if there is no basePath",
"BasePathPathnameNormalizer match should return true if the pathname starts with the basePath",
"BasePathPathnameNormalizer normalize should return the same pathname if there is no basePath",
"BasePathPathnameNormalizer normalize should return the same pathname if we are not matched and the pathname does not start with the basePath",
"BasePathPathnameNormalizer normalize should strip the basePath from the pathname when it matches"
"BasePathPathnameNormalizer should throw when provided with a basePath of \"/\"",
"BasePathPathnameNormalizer should throw when provided with a blank basePath"
],
"failed": [],
"pending": [],
@ -559,42 +555,36 @@
},
"packages/next/src/server/future/normalizers/request/postponed.test.ts": {
"passed": [
"PostponedPathnameNormalizer match should match if it is enabled",
"PostponedPathnameNormalizer match should match",
"PostponedPathnameNormalizer match should not match for other pathnames",
"PostponedPathnameNormalizer match should not match if it is disabled",
"PostponedPathnameNormalizer normalize should normalize `/index` to `/`",
"PostponedPathnameNormalizer normalize should normalize if it is enabled and matched",
"PostponedPathnameNormalizer normalize should not normalize if it is disabled",
"PostponedPathnameNormalizer normalize should not normalize if it is enabled but not matched"
"PostponedPathnameNormalizer normalize should normalize when matched",
"PostponedPathnameNormalizer normalize should not normalize but not matched"
],
"failed": [],
"pending": [],
"flakey": [],
"runtimeError": false
},
"packages/next/src/server/future/normalizers/request/prefetch-rsc.test.ts": {
"packages/next/src/server/future/normalizers/request/prefix.test.ts": {
"passed": [
"PrefetchRSCPathnameNormalizer match should return false if it is disabled but ends with .prefetch.rsc",
"PrefetchRSCPathnameNormalizer match should return false if it only ends in .rsc",
"PrefetchRSCPathnameNormalizer match should return false if the pathname does not end with `.prefetch.rsc`",
"PrefetchRSCPathnameNormalizer match should return true if it matches",
"PrefetchRSCPathnameNormalizer normalize should return the same pathname if it is disabled but ends with .prefetch.rsc",
"PrefetchRSCPathnameNormalizer normalize should return the same pathname if we are not matched and the pathname does not end with `.prefetch.rsc`",
"PrefetchRSCPathnameNormalizer normalize should strip the `.prefetch.rsc` extension from the pathname when it matches"
"PrefixPathnameNormalizer match should return false if the pathname does not start with the prefix",
"PrefixPathnameNormalizer match should return true if the pathname starts with the prefix",
"PrefixPathnameNormalizer normalize should return the same pathname if we are not matched and the pathname does not start with the prefix",
"PrefixPathnameNormalizer normalize should strip the prefix from the pathname when it matches",
"PrefixPathnameNormalizer should throw if the prefix ends with a slash"
],
"failed": [],
"pending": [],
"flakey": [],
"runtimeError": false
},
"packages/next/src/server/future/normalizers/request/rsc.test.ts": {
"packages/next/src/server/future/normalizers/request/suffix.test.ts": {
"passed": [
"RSCPathnameNormalizer match should return false if it is disabled but ends with .rsc",
"RSCPathnameNormalizer match should return false if the pathname does not end with `.rsc`",
"RSCPathnameNormalizer match should return true if it matches",
"RSCPathnameNormalizer normalize should return the same pathname if it is disabled but ends with .rsc",
"RSCPathnameNormalizer normalize should return the same pathname if we are not matched and the pathname does not end with `.rsc`",
"RSCPathnameNormalizer normalize should strip the `.rsc` extension from the pathname when it matches"
"SuffixPathnameNormalizer match should return false if the pathname does not end with `.rsc`",
"SuffixPathnameNormalizer match should return true if it matches",
"SuffixPathnameNormalizer normalize should return the same pathname if we are not matched and the pathname does not end with `.rsc`",
"SuffixPathnameNormalizer normalize should strip the `.rsc` extension from the pathname when it matches"
],
"failed": [],
"pending": [],
@ -1248,7 +1238,6 @@
"test/development/acceptance/ReactRefreshLogBox.test.ts": {
"passed": [
"ReactRefreshLogBox turbo boundaries",
"ReactRefreshLogBox turbo conversion to class component (1)",
"ReactRefreshLogBox turbo module init error not shown",
"ReactRefreshLogBox turbo non-Error errors are handled properly",
"ReactRefreshLogBox turbo should strip whitespace correctly with newline"
@ -1270,7 +1259,7 @@
"ReactRefreshLogBox default unterminated JSX",
"ReactRefreshLogBox turbo internal package errors"
],
"flakey": [],
"flakey": ["ReactRefreshLogBox turbo conversion to class component (1)"],
"runtimeError": false
},
"test/development/acceptance/ReactRefreshLogBoxMisc.test.ts": {
@ -1342,13 +1331,13 @@
},
"test/development/acceptance/error-recovery.test.ts": {
"passed": [
"ReactRefreshLogBox turbo logbox: can recover from a syntax error without losing state"
"ReactRefreshLogBox turbo logbox: can recover from a syntax error without losing state",
"ReactRefreshLogBox turbo stuck error"
],
"failed": [
"ReactRefreshLogBox turbo logbox: can recover from a component error",
"ReactRefreshLogBox turbo logbox: can recover from a event handler error",
"ReactRefreshLogBox turbo render error not shown right after syntax error",
"ReactRefreshLogBox turbo stuck error",
"ReactRefreshLogBox turbo syntax > runtime error"
],
"pending": [
@ -2165,20 +2154,28 @@
"flakey": [],
"runtimeError": false
},
"test/e2e/app-dir/actions-navigation/index.test.ts": {
"test/e2e/app-dir/actions-allowed-origins/app-action-allowed-origins.test.ts": {
"passed": [
"app-dir action handling should handle actions correctly after following a relative link",
"app-dir action handling should handle actions correctly after navigation / redirection events"
"app-dir action allowed origins should pass if localhost is set as a safe origin"
],
"failed": [],
"pending": [],
"flakey": [],
"runtimeError": false
},
"test/e2e/app-dir/actions/app-action-allowed-hosts.test.ts": {
"test/e2e/app-dir/actions-allowed-origins/app-action-disallowed-origins.test.ts": {
"passed": [
"app-dir action allowed fowarding hosts should error if setting an invalid x-forwarded-host header",
"app-dir action allowed fowarding hosts should pass if using an allowed host"
"app-dir action disallowed origins should error if x-forwarded-host does not match the origin"
],
"failed": [],
"pending": [],
"flakey": [],
"runtimeError": false
},
"test/e2e/app-dir/actions-navigation/index.test.ts": {
"passed": [
"app-dir action handling should handle actions correctly after following a relative link",
"app-dir action handling should handle actions correctly after navigation / redirection events"
],
"failed": [],
"pending": [],
@ -2355,7 +2352,6 @@
"app dir - css css support css ordering should have inner layers take precedence over outer layers",
"app dir - css css support page extensions should include css imported in MDX pages",
"app dir - css css support server layouts should support css modules inside server layouts",
"app dir - css css support server layouts should support external css imports",
"app dir - css css support server pages should not contain pages css in app dir page",
"app dir - css css support server pages should support css modules inside server pages",
"app dir - css css support server pages should support global css inside server pages",
@ -2390,7 +2386,9 @@
"app dir - css css support multiple entries should only load chunks for the css module that is used by the specific entrypoint",
"app dir - css css support server layouts should support global css inside server layouts"
],
"flakey": [],
"flakey": [
"app dir - css css support server layouts should support external css imports"
],
"runtimeError": false
},
"test/e2e/app-dir/app-edge-root-layout/index.test.ts": {
@ -3368,12 +3366,10 @@
"app dir - metadata dynamic routes social image routes should support params as argument in dynamic routes",
"app dir - metadata dynamic routes text routes should handle robots.[ext] dynamic routes",
"app dir - metadata dynamic routes text routes should handle sitemap.[ext] dynamic routes",
"app dir - metadata dynamic routes text routes should not throw if client components are imported but not used",
"app dir - metadata dynamic routes should generate unique path for image routes under group routes",
"app dir - metadata dynamic routes social image routes should handle custom fonts in both edge and nodejs runtime"
"app dir - metadata dynamic routes text routes should not throw if client components are imported but not used"
],
"failed": [
"app dir - should error if the default export of dynamic image is missing"
"app dir - metadata dynamic routes should error if the default export of dynamic image is missing"
],
"pending": [],
"flakey": [],
@ -3424,7 +3420,6 @@
"app dir - metadata basic should support title template",
"app dir - metadata basic should support verification tags",
"app dir - metadata basic should use parent layout title when no title is defined in page",
"app dir - metadata file based icons should handle updates to the file icon name and order",
"app dir - metadata file based icons should not render if image file is not specified",
"app dir - metadata file based icons should render icon and apple touch icon meta if their images are specified",
"app dir - metadata icons should merge icons from layout if no static icons files are specified",
@ -3440,23 +3435,25 @@
"app dir - metadata opengraph should pick up opengraph-image and twitter-image as static metadata files",
"app dir - metadata opengraph should support opengraph tags",
"app dir - metadata opengraph should support opengraph with article type",
"app dir - metadata react cache should have same title and page value on initial load",
"app dir - metadata react cache should have same title and page value when navigating",
"app dir - metadata should not effect metadata images convention like files under pages directory",
"app dir - metadata static routes should have /favicon.ico as route",
"app dir - metadata static routes should have icons as route",
"app dir - metadata static routes should support root dir robots.txt",
"app dir - metadata static routes should support sitemap.xml under every routes",
"app dir - metadata static routes should support static manifest.webmanifest",
"app dir - metadata static routes should support static manifest.webmanifest"
],
"failed": [],
"pending": [],
"flakey": [
"app dir - metadata file based icons should handle updates to the file icon name and order",
"app dir - metadata react cache should have same title and page value on initial load",
"app dir - metadata react cache should have same title and page value when navigating",
"app dir - metadata static routes should have icons as route",
"app dir - metadata twitter should render twitter card summary when image is not present",
"app dir - metadata twitter should support default twitter app card",
"app dir - metadata twitter should support default twitter player card",
"app dir - metadata twitter should support twitter card summary_large_image when image present",
"app dir - metadata viewport should support dynamic viewport export"
],
"failed": [],
"pending": [],
"flakey": [],
"runtimeError": false
},
"test/e2e/app-dir/navigation/navigation.test.ts": {
@ -3661,7 +3658,6 @@
},
"test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts": {
"passed": [
"parallel-routes-and-interception parallel routes should apply the catch-all route to the parallel route if no matching route is found",
"parallel-routes-and-interception parallel routes should display all parallel route params with useParams",
"parallel-routes-and-interception parallel routes should match parallel routes",
"parallel-routes-and-interception parallel routes should match parallel routes in route groups",
@ -3679,12 +3675,14 @@
"parallel-routes-and-interception route intercepting should render intercepted route",
"parallel-routes-and-interception route intercepting should render intercepted route from a nested route",
"parallel-routes-and-interception route intercepting should render modal when paired with parallel routes",
"parallel-routes-and-interception route intercepting should support intercepting local dynamic sibling routes",
"parallel-routes-and-interception route intercepting should support intercepting with beforeFiles rewrites",
"parallel-routes-and-interception route intercepting with dynamic catch-all routes should render intercepted route",
"parallel-routes-and-interception route intercepting with dynamic optional catch-all routes should render intercepted route",
"parallel-routes-and-interception route intercepting with dynamic routes should render intercepted route"
],
"failed": [
"parallel-routes-and-interception parallel routes should apply the catch-all route to the parallel route if no matching route is found",
"parallel-routes-and-interception parallel routes should throw an error when a route groups causes a conflict with a parallel segment"
],
"pending": [],
@ -3715,6 +3713,7 @@
"ppr build errors outside of a suspense boundary should fail the build for uncaught errors",
"ppr build errors outside of a suspense boundary when a postpone call was made but missing postpone data should fail the build",
"ppr build errors outside of a suspense boundary when a postpone call was made but missing postpone data should fail the build & surface any errors that were thrown by user code",
"ppr build errors when a postpone call is caught and logged it should should include a message telling why",
"ppr build errors within a suspense boundary should fail the build for uncaught prerender errors",
"ppr build errors within a suspense boundary when a postpone call was made but missing postpone data should fail the build",
"ppr build errors within a suspense boundary when a postpone call was made but missing postpone data should fail the build & surface any errors that were thrown by user code"
@ -3743,6 +3742,7 @@
"ppr for /suspense/node/nested/2 should serve the static part",
"ppr for /suspense/node/nested/3 should have the dynamic part",
"ppr for /suspense/node/nested/3 should serve the static part",
"ppr should indicate the feature is experimental",
"ppr with suspense for /suspense/edge should eventually render the dynamic part",
"ppr with suspense for /suspense/node should eventually render the dynamic part",
"ppr without suspense for /no-suspense should immediately render the dynamic part"
@ -4086,8 +4086,6 @@
"basePath should handle query/hash correctly during query updating #hello? $search",
"basePath should handle query/hash correctly during query updating #hello?world $search",
"basePath should have basePath field on Router",
"basePath should have correct href for a link",
"basePath should have correct href for a link to /",
"basePath should have correct router paths on first load of /",
"basePath should have correct router paths on first load of /hello",
"basePath should navigate an absolute local url with basePath",
@ -4127,7 +4125,10 @@
"basePath should work with nested folder with same name as basePath",
"basePath should work with normal dynamic page"
],
"failed": [],
"failed": [
"basePath should have correct href for a link",
"basePath should have correct href for a link to /"
],
"pending": [
"basePath should navigate back to a non-basepath 404 that starts with basepath",
"basePath should navigate to nested index page with getStaticProps"
@ -4211,11 +4212,10 @@
"runtimeError": true
},
"test/e2e/conflicting-app-page-error/index.test.ts": {
"passed": [
"Conflict between app file and pages file should not show error overlay for non conflict pages under app or pages dir"
],
"passed": [],
"failed": [
"Conflict between app file and pages file should error again when there is new conflict",
"Conflict between app file and pages file should not show error overlay for non conflict pages under app or pages dir",
"Conflict between app file and pages file should show error overlay for /",
"Conflict between app file and pages file should show error overlay for /another",
"Conflict between app file and pages file should support hmr with conflicts"
@ -5578,11 +5578,14 @@
"test/e2e/skip-trailing-slash-redirect/index.test.ts": {
"passed": [
"skip-trailing-slash-redirect app dir - skip trailing slash redirect should navigate client side correctly",
"skip-trailing-slash-redirect app dir - skip trailing slash redirect should not apply trailing slash redirect (with slash)",
"skip-trailing-slash-redirect app dir - skip trailing slash redirect should not apply trailing slash redirect (without slash)",
"skip-trailing-slash-redirect app dir - skip trailing slash redirect should preserve original trailing slashes to links on client",
"skip-trailing-slash-redirect app dir - skip trailing slash redirect should respond to dynamic route correctly",
"skip-trailing-slash-redirect app dir - skip trailing slash redirect should respond to index correctly",
"skip-trailing-slash-redirect pages dir should navigate client side correctly",
"skip-trailing-slash-redirect pages dir should not apply trailing slash redirect (with slash)",
"skip-trailing-slash-redirect pages dir should not apply trailing slash redirect (without slash)",
"skip-trailing-slash-redirect pages dir should preserve original trailing slashes to links on client",
"skip-trailing-slash-redirect pages dir should respond to dynamic route correctly",
"skip-trailing-slash-redirect pages dir should respond to index correctly",
"skip-trailing-slash-redirect should allow response body from middleware with flag",
@ -5604,10 +5607,7 @@
"skip-trailing-slash-redirect should provide original _next/data URL with skipMiddlewareUrlNormalize"
],
"failed": [
"skip-trailing-slash-redirect app dir - skip trailing slash redirect should not apply trailing slash redirect (with slash)",
"skip-trailing-slash-redirect app dir - skip trailing slash redirect should not apply trailing slash redirect (without slash)",
"skip-trailing-slash-redirect app dir - skip trailing slash redirect should respond to dynamic route correctly",
"skip-trailing-slash-redirect app dir - skip trailing slash redirect should respond to index correctly"
"skip-trailing-slash-redirect pages dir should preserve original trailing slashes to links on client"
],
"pending": [],
"flakey": [],
@ -6367,7 +6367,6 @@
"test/integration/app-document/test/index.test.js": {
"passed": [
"Document and App Client side It should share module state with pages",
"Document and App Client side should detect the changes to pages/_app.js and display it",
"Document and App Client side should keep state between page navigations",
"Document and App Rendering via HTTP _app It should share module state with pages",
"Document and App Rendering via HTTP _app It should show valid error when thrown in _app getInitialProps",
@ -6388,6 +6387,7 @@
"failed": [],
"pending": [],
"flakey": [
"Document and App Client side should detect the changes to pages/_app.js and display it",
"Document and App Client side should detect the changes to pages/_document.js and display it"
],
"runtimeError": false
@ -7187,16 +7187,17 @@
},
"test/integration/css/test/css-modules.test.js": {
"passed": [
"CSS Modules Composes Ordering Development Mode should have correct color on index page (on load)",
"Ordering with Global CSS and Modules (dev) should not execute scripts in any order"
],
"failed": [
"Basic CSS Modules Ordering Development Mode should have correct color on index page (on hover)",
"Basic CSS Modules Ordering Development Mode should have correct color on index page (on load)",
"Basic CSS Modules Ordering Development Mode should have correct color on index page (on nav)",
"CSS Modules Composes Ordering Development Mode should have correct color on index page (on hover)",
"CSS Modules Composes Ordering Development Mode should have correct color on index page (on load)",
"Ordering with Global CSS and Modules (dev) should have the correct color (css ordering)",
"Ordering with Global CSS and Modules (dev) should have the correct color (css ordering) during hot reloads",
"Ordering with Global CSS and Modules (dev) should not execute scripts in any order"
"Ordering with Global CSS and Modules (dev) should have the correct color (css ordering) during hot reloads"
],
"failed": [],
"pending": [
"Basic CSS Modules Ordering production mode should have correct color on index page (on hover)",
"Basic CSS Modules Ordering production mode should have correct color on index page (on load)",
@ -7940,8 +7941,7 @@
"Dynamic Routing dev mode should show error when interpolating fails for href",
"Dynamic Routing dev mode should support long URLs for dynamic routes",
"Dynamic Routing dev mode should update dynamic values on mount",
"Dynamic Routing dev mode should update with a hash in the URL",
"Dynamic Routing dev mode should work with HMR correctly"
"Dynamic Routing dev mode should update with a hash in the URL"
],
"failed": [
"Dynamic Routing dev mode should resolve dynamic route href for page added later"
@ -8021,6 +8021,7 @@
"Dynamic Routing production mode should update with a hash in the URL"
],
"flakey": [
"Dynamic Routing dev mode should work with HMR correctly",
"Dynamic Routing production mode should have correct cache entries on prefetch",
"Dynamic Routing production mode should render dynamic route with query"
],