Skip to content

Commit 1f3d89f

Browse files
authored
test: use globSync (#446)
1 parent 4773f94 commit 1f3d89f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

playground/config-no-runtime-in-build/__tests__/test.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fs from 'fs'
2-
import { glob } from 'tinyglobby'
2+
import { globSync } from 'tinyglobby'
33
import path from 'path'
44
import { describe, expect, it } from 'vitest'
55

@@ -9,7 +9,9 @@ describe('config-no-runtime-code-in-build', () => {
99
describe.runIf(isBuild)('build', () => {
1010
it('should not contain plugin code in build artifacts', async () => {
1111
await sleepForServerReady()
12-
for await (const file of await glob(path.resolve(testDir, 'dist'), { onlyFiles: true })) {
12+
const files = globSync('**', { cwd: path.resolve(testDir, 'dist'), absolute: true, onlyFiles: true })
13+
expect(files.length).toBeGreaterThan(1)
14+
for await (const file of files) {
1315
const content = await fs.promises.readFile(file, 'utf-8')
1416
expect(content).not.toContain('vite-plugin-checker')
1517
}

0 commit comments

Comments
 (0)