summaryrefslogtreecommitdiff
path: root/packages/integrations/netlify/test/functions/404.test.js
blob: f12919a391727157153b96e32e4fde6920b08cbe (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
import { expect } from 'chai';
import netlifyAdapter from '../../dist/index.js';
import { loadFixture, testIntegration } from './test-utils.js';

describe('404 page', () => {
	/** @type {import('./test-utils').Fixture} */
	let fixture;

	before(async () => {
		fixture = await loadFixture({
			root: new URL('./fixtures/404/', import.meta.url).toString(),
			output: 'server',
			adapter: netlifyAdapter({
				dist: new URL('./fixtures/404/dist/', import.meta.url),
			}),
			site: `http://example.com`,
			integrations: [testIntegration()],
		});
		await fixture.build();
	});

	it('404 route is included in the redirect file', async () => {
		const redir = await fixture.readFile('/_redirects');
		const expr = new RegExp('/*    /.netlify/functions/entry    404');
		expect(redir).to.match(expr);
	});
});
ipts/stats/stats.csv?h=fix-s-island-fallback&id=015b276a4230f00a86e91aa9dc433bd704ae4a71&follow=1'>[ci] collect statsGravatar FredKSchott 1-0/+1 2022-02-04[ci] yarn formatGravatar natemoo-re 1-2/+3 2022-02-04fix: HTML/SVG boolean attributes (#2538)Gravatar Nate Moore 2-3/+21 * fix: HTML/SVG boolean attributes * fix: update case-sensitivity of attributes * Update packages/astro/src/runtime/server/index.ts Co-authored-by: Jonathan Neal <jonathantneal@hotmail.com> Co-authored-by: Jonathan Neal <jonathantneal@hotmail.com> 2022-02-04[ci] yarn formatGravatar matthewp 1-4/+2 2022-02-04fix: import local plugins into markdown (#2534)Gravatar Juan Martín Seery 9-22/+41 * Replaced "UnifiedPluginImport" for a function * Updated tests * Updated docs * Updated examples * Added changeset * Fixed tests * Removed unused "UnifiedPluginImport" * Duplicated add-classes.mjs 2022-02-04[ci] collect statsGravatar FredKSchott 1-0/+1 2022-02-03Append to list of HMR modules, don't override (#2532)Gravatar Matthew Phillips 2-1/+6 * Append to list of HMR modules, don't override * Changeset 2022-02-03add back dev server host support (#2531)Gravatar Fred K. Schott 2-1/+14 2022-02-03simplify status code regexGravatar Fred K. Schott 2-87/+4 2022-02-03Adding StackUp Digital to the list of sponsors (#2521)Gravatar Astroalex 3-0/+10 * adding svg files for stackup * Change list of sponsors w/testing * change back to withastro, done testing 2022-02-03[ci] collect statsGravatar FredKSchott 1-0/+1 2022-02-03[ci] yarn formatGravatar FredKSchott 2-3/+85 2022-02-02Handles all http error code file names the same as 404 files. (#2525)Gravatar Zade Viggers 2-4/+7 * Fix #2195 * Filter out error code files from sitemap 2022-02-02fix(sitemap): remove debug if sitemap disabled (#2514)Gravatar Mark Pinero 1-2/+2 2022-02-02[ci] update lockfile (#2515)Gravatar Fred K. Schott 1-276/+279 Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com> 2022-02-02[ci] yarn formatGravatar matthewp 1-8/+8 2022-02-02[ci] release (next) (#2523)astro@0.23.0-next.1Gravatar github-actions[bot] 28-34/+41 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> 2022-02-02[ci] yarn formatGravatar matthewp 2-17/+29 2022-02-02Fix support for scss in static build (#2522)Gravatar Matthew Phillips 6-20/+114 * Fix support for scss in static build * Adds a changeset * Pass the normalizedID to transformWithVite 2022-02-02[ci] collect statsGravatar FredKSchott 1-0/+1 2022-02-01[ci] yarn formatGravatar matthewp 2-12/+12 2022-02-01[ci] release (next) (#2492)astro@0.23.0-next.0@astrojs/test-static-build-pkg@0.0.2@astrojs/markdown-remark@0.6.1-next.0Gravatar github-actions[bot] 31-43/+93 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> 2022-02-01[ci] collect statsGravatar FredKSchott 1-0/+1 2022-01-31update congratsbot format againGravatar Fred K. Schott 1-1/+1 2022-01-31update congratsbot againGravatar Fred K. Schott 1-1/+1 2022-01-31Remove SVG animation on GitHub/NPM (#2512)Gravatar Nate Moore 1-21/+0 * perf: remove SVG animation * update readme * Revert "update readme" This reverts commit 71abb6629d51d08ec7a50890ecf44140f6bc6b35. 2022-01-31[ci] yarn formatGravatar natemoo-re 2-4/+6 2022-01-31Add Shiki as an alternative to Prism (#2497)Gravatar Juan Martín Seery 26-9/+356 * [ci] yarn format * Added shiki to markdown-remark * Upgraded astro shiki * Added minimal example * Changed defaults to match <Code /> * Replace `shiki` with `astro` classes * Added documentation * Updated Astro code to use new `codeToHtml` * Added changesets * Added basic test * Updated tests a bit Co-authored-by: JuanM04 <JuanM04@users.noreply.github.com> 2022-01-31Deprecate unescaped HTML inside of expressions (#2489)Gravatar Nate Moore 9-31/+74 * feat: implement automatic escaping * feat: deprecate automatic escaping * fix: cast unescapeHTML as string * fix: slot fallback behavior * fix: unescaped content * Update escape.ts * Update escape.ts * feat: update internal components to use `set:html` * chore: update compiler * chore: update changeset