From 68b3c88d8cc7e7ef46fa3eefba0674ccdb3f6403 Mon Sep 17 00:00:00 2001 From: 1aron Date: Sun, 5 Nov 2023 13:58:14 +0800 Subject: [PATCH] Fix tests --- packages/extractor/tests/watch/test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/extractor/tests/watch/test.ts b/packages/extractor/tests/watch/test.ts index 9948113c9..41f3dadb8 100644 --- a/packages/extractor/tests/watch/test.ts +++ b/packages/extractor/tests/watch/test.ts @@ -64,7 +64,7 @@ beforeAll(() => { fs.writeFileSync(configFilepath, originConfigText) child = spawnd('tsx ../../../css/src/bin extract -w', { shell: true, cwd: __dirname }) -}, 30000) +}, 45000) it('start watch process', async () => { await waitForDataMatch(child, (data) => data.includes('Start watching source changes')) @@ -73,7 +73,7 @@ it('start watch process', async () => { expect(fileCSSText).toContain(cssEscape('font:48')) expect(fileCSSText).toContain(cssEscape('bg:primary')) expect(fileCSSText).toContain(cssEscape('btn')) -}, 30000) +}, 45000) it('change options file `fixed` and reset process', async () => { await waitForDataMatch(child, (data) => data.includes('Restart watching source changes'), async () => { @@ -81,7 +81,7 @@ it('change options file `fixed` and reset process', async () => { }) const fileCSSText = fs.readFileSync(virtualCSSFilepath, { encoding: 'utf8' }) expect(fileCSSText).toContain(cssEscape('fg:red')) -}, 30000) +}, 45000) it('change config file `styles` and reset process', async () => { await waitForDataMatch(child, (data) => data.includes('Restart watching source changes'), async () => { @@ -89,7 +89,7 @@ it('change config file `styles` and reset process', async () => { }) const fileCSSText = fs.readFileSync(virtualCSSFilepath, { encoding: 'utf8' }) expect(fileCSSText).toContain(cssEscape('bg:blue')) -}, 30000) +}, 45000) it('change html file class attr and update', async () => { await waitForDataMatch(child, (data) => data.includes('exported'), async () => { @@ -98,8 +98,8 @@ it('change html file class attr and update', async () => { const fileCSSText = fs.readFileSync(virtualCSSFilepath, { encoding: 'utf8' }) /** There is no recycling mechanism during the development */ expect(fileCSSText).toContain(cssEscape('text:underline')) -}, 30000) +}, 45000) afterAll(async () => { await child.destroy() -}, 30000) \ No newline at end of file +}, 45000) \ No newline at end of file