From d62d19bbad04f47c17ee7fee63323675016c0708 Mon Sep 17 00:00:00 2001 From: Shu Ding Date: Tue, 8 Feb 2022 14:23:17 +0100 Subject: [PATCH 1/3] fix functions-manifest test --- .../react-streaming-and-server-components/test/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/react-streaming-and-server-components/test/functions.js b/test/integration/react-streaming-and-server-components/test/functions.js index 78c85e4455e66..32ba38133cd66 100644 --- a/test/integration/react-streaming-and-server-components/test/functions.js +++ b/test/integration/react-streaming-and-server-components/test/functions.js @@ -15,8 +15,8 @@ export default function (context) { 'server', 'functions-manifest.json' ) - await fs.remove(join(context.appDir, '.next')) expect(fs.existsSync(functionsManifestPath)).toBe(false) + await fs.remove(join(context.appDir, '.next')) }) it('should contain rsc paths in functions manifest', async () => { await nextBuild(context.appDir, { env: { ENABLE_FILE_SYSTEM_API: '1' } }) From 4df1cb096b0519e53212f41cc40a8352f4d1e1e3 Mon Sep 17 00:00:00 2001 From: Shu Ding Date: Tue, 8 Feb 2022 14:28:32 +0100 Subject: [PATCH 2/3] clean the build before starting --- .../react-streaming-and-server-components/test/functions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/integration/react-streaming-and-server-components/test/functions.js b/test/integration/react-streaming-and-server-components/test/functions.js index 32ba38133cd66..b34b9897223a7 100644 --- a/test/integration/react-streaming-and-server-components/test/functions.js +++ b/test/integration/react-streaming-and-server-components/test/functions.js @@ -9,6 +9,8 @@ import { nextBuild } from './utils' export default function (context) { it('should not generate functions manifest when filesystem API is not enabled', async () => { + // Make sure there is no existing functions manifest (caused by failed tests etc). + await fs.remove(join(context.appDir, '.next')) await nextBuild(context.appDir) const functionsManifestPath = join( context.distDir, @@ -16,7 +18,6 @@ export default function (context) { 'functions-manifest.json' ) expect(fs.existsSync(functionsManifestPath)).toBe(false) - await fs.remove(join(context.appDir, '.next')) }) it('should contain rsc paths in functions manifest', async () => { await nextBuild(context.appDir, { env: { ENABLE_FILE_SYSTEM_API: '1' } }) From 4f2e3616600783f6f3c901b73496b794640730de Mon Sep 17 00:00:00 2001 From: Shu Ding Date: Tue, 8 Feb 2022 15:37:51 +0100 Subject: [PATCH 3/3] fix test --- .../react-streaming-and-server-components/test/functions.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/integration/react-streaming-and-server-components/test/functions.js b/test/integration/react-streaming-and-server-components/test/functions.js index b34b9897223a7..6283ff46b5a17 100644 --- a/test/integration/react-streaming-and-server-components/test/functions.js +++ b/test/integration/react-streaming-and-server-components/test/functions.js @@ -18,6 +18,7 @@ export default function (context) { 'functions-manifest.json' ) expect(fs.existsSync(functionsManifestPath)).toBe(false) + await fs.remove(join(context.appDir, '.next')) }) it('should contain rsc paths in functions manifest', async () => { await nextBuild(context.appDir, { env: { ENABLE_FILE_SYSTEM_API: '1' } })