mirror of
https://github.com/hanzoai/msw.git
synced 2026-09-24 17:00:34 +00:00
13 lines
270 B
TypeScript
13 lines
270 B
TypeScript
import { http } from 'msw'
|
|
import { setupWorker } from 'msw/browser'
|
|
|
|
const worker = setupWorker(
|
|
http.get('https://api.github.com/users/:username', () => {
|
|
// @ts-expect-error nonExisting should not be defined
|
|
nonExisting()
|
|
return
|
|
}),
|
|
)
|
|
|
|
worker.start()
|