// index.test.js
import { describe, expect, test } from 'vitest'
import index from './index'
describe('index worker', () => {
test('GET /', async () => {
const res = await index.request('/')
expect(res.status).toBe(200)
const body = (await res.text())
expect(body).toBe('Hello world')
})
})
// index.test.js
import { describe, expect, test } from 'vitest'
import index from './index'
describe('index worker', () => {
test('GET /', async () => {
const res = await index.request('/')
expect(res.status).toBe(200)
const body = (await res.text())
expect(body).toBe('Hello world')
})
})