Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions playground/config-no-runtime-in-build/__tests__/test.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs'
import { glob } from 'tinyglobby'
import { globSync } from 'tinyglobby'
import path from 'path'
import { describe, expect, it } from 'vitest'

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