diff --git a/test/e2e/app-dir/app-basepath/index.test.ts b/test/e2e/app-dir/app-basepath/index.test.ts index 1cd3880f748d..ae6893aa9384 100644 --- a/test/e2e/app-dir/app-basepath/index.test.ts +++ b/test/e2e/app-dir/app-basepath/index.test.ts @@ -6,7 +6,6 @@ createNextDescribe( files: __dirname, skipDeployment: true, dependencies: { - swr: '2.0.0-rc.0', react: 'latest', 'react-dom': 'latest', sass: 'latest', diff --git a/test/e2e/app-dir/app-css/index.test.ts b/test/e2e/app-dir/app-css/index.test.ts index abb441bfdcf8..5ef9ea95af18 100644 --- a/test/e2e/app-dir/app-css/index.test.ts +++ b/test/e2e/app-dir/app-css/index.test.ts @@ -7,7 +7,6 @@ createNextDescribe( files: __dirname, skipDeployment: true, dependencies: { - swr: '2.0.0-rc.0', '@picocss/pico': '1.5.7', react: 'latest', 'react-dom': 'latest', @@ -506,9 +505,9 @@ createNextDescribe( const browser = await next.browser('/suspensey-css') await browser.elementByCss('#slow').click() await check(() => browser.eval(`document.body.innerText`), 'Get back') - expect(await browser.eval(`window.__log`)).toEqual( - 'background = rgb(255, 255, 0)' - ) + await check(async () => { + return await browser.eval(`window.__log`) + }, /background = rgb\(255, 255, 0\)/) }) it('should timeout if the resource takes too long', async () => { diff --git a/test/e2e/app-dir/app-external/app-external.test.ts b/test/e2e/app-dir/app-external/app-external.test.ts index 63f8816672f1..06205b2e6aed 100644 --- a/test/e2e/app-dir/app-external/app-external.test.ts +++ b/test/e2e/app-dir/app-external/app-external.test.ts @@ -21,7 +21,7 @@ createNextDescribe( dependencies: { react: 'latest', 'react-dom': 'latest', - swr: '2.0.0-rc.0', + swr: 'latest', }, packageJson: { scripts: { diff --git a/test/e2e/app-dir/app/index.test.ts b/test/e2e/app-dir/app/index.test.ts index 58d853e26269..a6e6e7debb39 100644 --- a/test/e2e/app-dir/app/index.test.ts +++ b/test/e2e/app-dir/app/index.test.ts @@ -8,12 +8,6 @@ createNextDescribe( 'app dir', { files: __dirname, - dependencies: { - swr: '2.0.0-rc.0', - react: 'latest', - 'react-dom': 'latest', - sass: 'latest', - }, }, ({ next, isNextDev: isDev, isNextStart, isNextDeploy }) => { if (!isDev) { @@ -215,9 +209,6 @@ createNextDescribe( it('should serve from pages', async () => { const html = await next.render('/') expect(html).toContain('hello from pages/index') - - // esm imports should work fine in pages/ - expect(html).toContain('swr-index') }) it('should serve dynamic route from pages', async () => { diff --git a/test/e2e/app-dir/app/pages/index.js b/test/e2e/app-dir/app/pages/index.js index ac03305fde3c..5ee253ffe17b 100644 --- a/test/e2e/app-dir/app/pages/index.js +++ b/test/e2e/app-dir/app/pages/index.js @@ -1,15 +1,12 @@ import React from 'react' import Link from 'next/link' -import useSWR from 'swr' import styles from '../styles/shared.module.css' export default function Page() { - const { data } = useSWR('swr-index', (v) => v, { fallbackData: 'swr-index' }) return ( <>
hello from pages/index
Dashboard -