astro/packages/astro/test/astro-response.test.js
Matthew Phillips 3daaf510ea
Streaming (#3696)
* 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
2022-06-24 15:35:21 -04:00

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);
});
});