aboutsummaryrefslogtreecommitdiff
path: root/packages/integrations/cloudflare/test/function-per-route.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/cloudflare/test/function-per-route.test.js')
-rw-r--r--packages/integrations/cloudflare/test/function-per-route.test.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/packages/integrations/cloudflare/test/function-per-route.test.js b/packages/integrations/cloudflare/test/function-per-route.test.js
deleted file mode 100644
index 55d23e2ed..000000000
--- a/packages/integrations/cloudflare/test/function-per-route.test.js
+++ /dev/null
@@ -1,37 +0,0 @@
-import * as assert from 'node:assert/strict';
-import { existsSync } from 'node:fs';
-import { before, describe, it } from 'node:test';
-import { fileURLToPath } from 'node:url';
-import { astroCli } from './_test-utils.js';
-
-const root = new URL('./fixtures/function-per-route/', import.meta.url);
-
-describe('Function per Route', () => {
- before(async () => {
- await astroCli(fileURLToPath(root), 'build');
- });
-
- it('generates functions folder inside the project root', () => {
- const testURL = new URL('functions', root);
- assert.equal(existsSync(fileURLToPath(testURL)), true);
- });
-
- it('generates functions bundles for each page', () => {
- assert.equal(existsSync(fileURLToPath(new URL('functions/index.js', root))), true);
- assert.equal(existsSync(fileURLToPath(new URL('functions/blog/cool.js', root))), true);
- assert.equal(existsSync(fileURLToPath(new URL('functions/blog/[post].js', root))), true);
- assert.equal(existsSync(fileURLToPath(new URL('functions/[person]/[car].js', root))), true);
- assert.equal(existsSync(fileURLToPath(new URL('functions/files/[[path]].js', root))), true);
- assert.equal(
- existsSync(fileURLToPath(new URL('functions/[language]/files/[[path]].js', root))),
- true
- );
- assert.equal(existsSync(fileURLToPath(new URL('functions/trpc/[trpc].js', root))), true);
- assert.equal(existsSync(fileURLToPath(new URL('functions/javascript.js', root))), true);
- assert.equal(existsSync(fileURLToPath(new URL('functions/test.json.js', root))), true);
- });
-
- it('generates html files for pre-rendered routes', () => {
- assert.equal(existsSync(fileURLToPath(new URL('dist/prerender/index.html', root))), true);
- });
-});