mirror of
https://github.com/hanzoai/vitest.git
synced 2026-09-24 17:04:25 +00:00
11 lines
225 B
TypeScript
11 lines
225 B
TypeScript
import { expect, test, vi } from 'vitest'
|
|
import { hello } from './wrapper.js'
|
|
|
|
vi.mock(import('./wrapper.js'), () => {
|
|
return { hello: () => 'mock-hello' }
|
|
})
|
|
|
|
test('basic', () => {
|
|
expect(hello()).toBe('mock-hello')
|
|
})
|