summaryrefslogtreecommitdiff
path: root/packages/integrations/netlify/test/functions/404.test.js
diff options
context:
space:
mode:
authorGravatar alexanderniebuhr <alexanderniebuhr@users.noreply.github.com> 2023-10-16 14:10:41 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2023-10-16 14:10:41 +0000
commit3d1329414e507345b19e1dee81fe1bbff4eb3ae0 (patch)
tree69c822b1dc12f177b4919337109e6300a04df91d /packages/integrations/netlify/test/functions/404.test.js
parent63977f5e438062b7e9302b8feff41b662bfa6231 (diff)
downloadastro-3d1329414e507345b19e1dee81fe1bbff4eb3ae0.tar.gz
astro-3d1329414e507345b19e1dee81fe1bbff4eb3ae0.tar.zst
astro-3d1329414e507345b19e1dee81fe1bbff4eb3ae0.zip
[ci] format
Diffstat (limited to 'packages/integrations/netlify/test/functions/404.test.js')
-rw-r--r--packages/integrations/netlify/test/functions/404.test.js32
1 files changed, 17 insertions, 15 deletions
diff --git a/packages/integrations/netlify/test/functions/404.test.js b/packages/integrations/netlify/test/functions/404.test.js
index 1782507db..a1f792ce0 100644
--- a/packages/integrations/netlify/test/functions/404.test.js
+++ b/packages/integrations/netlify/test/functions/404.test.js
@@ -1,19 +1,21 @@
-import { expect } from 'chai';
-import fs from 'fs/promises';
-import { cli } from './test-utils.js';
-import { fileURLToPath } from 'url';
+import { expect } from "chai";
+import fs from "fs/promises";
+import { cli } from "./test-utils.js";
+import { fileURLToPath } from "url";
-const root = new URL('./fixtures/404/', import.meta.url).toString();
+const root = new URL("./fixtures/404/", import.meta.url).toString();
-describe('404 page', () => {
+describe("404 page", () => {
+ before(async () => {
+ await cli("build", "--root", fileURLToPath(root));
+ });
- before(async () => {
- await cli('build', '--root', fileURLToPath(root));
- });
-
- it('404 route is included in the redirect file', async () => {
- const redir = await fs.readFile(new URL('./dist/_redirects', root), 'utf-8');
- const expr = new RegExp('/* /.netlify/functions/entry 404');
- expect(redir).to.match(expr);
- });
+ it("404 route is included in the redirect file", async () => {
+ const redir = await fs.readFile(
+ new URL("./dist/_redirects", root),
+ "utf-8",
+ );
+ const expr = new RegExp("/* /.netlify/functions/entry 404");
+ expect(redir).to.match(expr);
+ });
});