3daaf510ea
* Start of streaming * New lockfile * Base should be Uint8Arrays * Remove the ability to throw from a component * Add a warning when returning a Response from a non-page component * Adds a changeset
27 lines
610 B
JavaScript
27 lines
610 B
JavaScript
import { expect } from 'chai';
|
|
import { load as cheerioLoad } from 'cheerio';
|
|
import { loadFixture } from './test-utils.js';
|
|
|
|
// Asset bundling
|
|
describe('Returning responses', () => {
|
|
let fixture;
|
|
/** @type {import('./test-utils').DevServer} */
|
|
let devServer;
|
|
|
|
before(async () => {
|
|
fixture = await loadFixture({
|
|
root: './fixtures/astro-response/',
|
|
});
|
|
|
|
devServer = await fixture.startDevServer();
|
|
});
|
|
|
|
after(async () => {
|
|
await devServer.stop();
|
|
});
|
|
|
|
it('Works from a page', async () => {
|
|
let response = await fixture.fetch('/not-found');
|
|
expect(response.status).to.equal(404);
|
|
});
|
|
});
|