Skip to content

Commit

Permalink
fix(browser): optimize expect-type
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Oct 15, 2024
1 parent 5d07bba commit 78f57ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/browser/src/node/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export default (browserServer: BrowserServer, base = '/'): Plugin[] => {
}

const include = [
'vitest > expect-type',
'vitest > @vitest/snapshot > magic-string',
'vitest > chai',
'vitest > chai > loupe',
Expand Down
6 changes: 5 additions & 1 deletion test/browser/specs/runner.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { readFile } from 'node:fs/promises'
import { beforeAll, describe, expect, onTestFailed, test } from 'vitest'
import { browser, runBrowserTests } from './utils'
import { defaultBrowserPort } from 'vitest/config'
import { browser, provider, runBrowserTests } from './utils'

describe('running browser tests', async () => {
let stderr: string
Expand Down Expand Up @@ -28,10 +29,13 @@ describe('running browser tests', async () => {
console.error(stderr)
})

expect(stdout).toContain(`Browser runner started by ${provider} at http://localhost:${defaultBrowserPort}/`)

expect(browserResultJson.testResults).toHaveLength(19)
expect(passedTests).toHaveLength(17)
expect(failedTests).toHaveLength(2)

expect(stderr).not.toContain('optimized dependencies changed')
expect(stderr).not.toContain('has been externalized for browser compatibility')
expect(stderr).not.toContain('Unhandled Error')
})
Expand Down

0 comments on commit 78f57ee

Please sign in to comment.