From dd7962d788a243b41b49facb6e481d643c25f5d0 Mon Sep 17 00:00:00 2001 From: Shu Ding Date: Tue, 8 Feb 2022 16:53:35 +0100 Subject: [PATCH] Fix functions manifest test (#34092) We should remove `.next` after checking the manifest file here. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint` --- .../react-streaming-and-server-components/test/functions.js | 4 +++- 1 file changed, 3 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 78c85e4455e66..6283ff46b5a17 100644 --- a/test/integration/react-streaming-and-server-components/test/functions.js +++ b/test/integration/react-streaming-and-server-components/test/functions.js @@ -9,14 +9,16 @@ 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, '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' } })