Is it possible to make Vitest code available both locally and in production?
I wrote a simple test. Do I always need to convert the
/ part to workers address or is there a way to do it in vitest?import app from '../src/index'
import { env } from 'cloudflare:test'
import { expect, describe, it } from 'vitest'
describe('Test the application', () => {
it('Should return 200 response', async () => {
const res = await app.request('/', {}, env);
expect(res.status).toBe(200);
expect(await res.json()).toEqual({
hello: 'world',
var: 'your_variable',
})
})