describe('bluegreen routing', () => {
const mf = new Miniflare({
envPath: true,
packagePath: true,
wranglerConfigPath: true,
scriptPath: 'dist/index.mjs',
modules: true
})
it('should route to the green worker', async () => {
const response = await mf.dispatchFetch('http://127.0.0.1/parent', {
method: 'GET'
})
if (response) {
const parsedResp = await response.text()
expect(parsedResp).toEqual('Green Hello World!')
}
})
})
describe('bluegreen routing', () => {
const mf = new Miniflare({
envPath: true,
packagePath: true,
wranglerConfigPath: true,
scriptPath: 'dist/index.mjs',
modules: true
})
it('should route to the green worker', async () => {
const response = await mf.dispatchFetch('http://127.0.0.1/parent', {
method: 'GET'
})
if (response) {
const parsedResp = await response.text()
expect(parsedResp).toEqual('Green Hello World!')
}
})
})