summaryrefslogtreecommitdiff
path: root/packages/integrations/cloudflare/test/hybrid.test.js
diff options
context:
space:
mode:
authorGravatar Alexander Niebuhr <alexander@nbhr.io> 2023-10-13 09:53:40 +0200
committerGravatar Alexander Niebuhr <alexander@nbhr.io> 2023-10-16 16:24:07 +0200
commit5ce6ac0b7d2bdc44f4c5083a8e8457892dcdf64d (patch)
tree62b86aecf8b27e9c1a6969acc6068b95a49c4bd3 /packages/integrations/cloudflare/test/hybrid.test.js
parent2c5fc57322ee42bb505aca72cd9b2e27b273b7eb (diff)
downloadastro-5ce6ac0b7d2bdc44f4c5083a8e8457892dcdf64d.tar.gz
astro-5ce6ac0b7d2bdc44f4c5083a8e8457892dcdf64d.tar.zst
astro-5ce6ac0b7d2bdc44f4c5083a8e8457892dcdf64d.zip
chore(cloudflare): fixup migration issues
Diffstat (limited to 'packages/integrations/cloudflare/test/hybrid.test.js')
-rw-r--r--packages/integrations/cloudflare/test/hybrid.test.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/integrations/cloudflare/test/hybrid.test.js b/packages/integrations/cloudflare/test/hybrid.test.js
new file mode 100644
index 000000000..f0f0e01e0
--- /dev/null
+++ b/packages/integrations/cloudflare/test/hybrid.test.js
@@ -0,0 +1,22 @@
+import { readFileSync } from 'fs';
+import { astroCli } from './_test-utils.js';
+import { expect } from 'chai';
+import { fileURLToPath } from 'url';
+
+const root = new URL('./fixtures/hybrid/', import.meta.url);
+
+describe('Hybrid rendering', () => {
+ before(async () => {
+ await astroCli(fileURLToPath(root), 'build');
+ });
+
+ it('includes non prerendered routes in the routes.json config', async () => {
+ const foundRoutes = JSON.parse(readFileSync(fileURLToPath(new URL('dist/_routes.json', root))));
+
+ expect(foundRoutes).to.deep.equal({
+ version: 1,
+ include: ['/one', '/_image'],
+ exclude: [],
+ });
+ });
+});