summaryrefslogtreecommitdiff
path: root/packages/integrations/node/test/errors.test.js
blob: 6bb93023a925881aa8b6b82852c9a149d03e7c29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import nodejs from '../dist/index.js';
import { loadFixture } from './test-utils.js';
import { expect } from 'chai';
import * as cheerio from 'cheerio';

describe('Errors', () => {
	let fixture;
	before(async () => {
		fixture = await loadFixture({
			root: './fixtures/errors/',
			output: 'server',
			adapter: nodejs({ mode: 'standalone' }),
		});
		await fixture.build();
	});
	describe('Within the stream', async () => {
		let devPreview;

		before(async () => {
			devPreview = await fixture.preview();
		});
		after(async () => {
			await devPreview.stop();
		});
		it('when mode is standalone', async () => {
			const res = await fixture.fetch('/in-stream');
			const html = await res.text();
			const $ = cheerio.load(html);

			expect($('p').text().trim()).to.equal('Internal server error');
		});
	});
});
lass='logsubject'>Add Astro.request.canonicalURL and Astro.site to global (#199)Gravatar Drew Powers 25-98/+234 2021-05-11Fix portfolio example (#196)Gravatar Drew Powers 2-3/+5 2021-05-10fix: build stuck on unhandled promise reject (#191)Gravatar Kevin (Kun) "Kassimo" Qian 2-2/+13 * fix: build stuck on unhandled promise reject * Changeset 2021-05-10Allow default import component to be renamed based on import statement ↵Gravatar Kevin (Kun) "Kassimo" Qian 3-8/+30 default specifier (#193) * Allow renaming for default import components * Changeset 2021-05-08Add more docs on styling (#186)Gravatar Drew Powers 1-3/+321 2021-05-08Fix running the extension (#181)Gravatar Matthew Phillips 5-11/+37 I'm not sure how my setup was different but I was unable to get the extension to run locally without adding a binary. This mirrors what Svelte does so I'm assuming it's the way it's supposed to be loaded.