summaryrefslogtreecommitdiff
path: root/packages/integrations/cloudflare/test/routes-json.test.js
diff options
context:
space:
mode:
authorGravatar Alexander Niebuhr <alexander@nbhr.io> 2025-01-07 16:52:23 +0100
committerGravatar GitHub <noreply@github.com> 2025-01-07 16:52:23 +0100
commit03f15c41f13b7b707e2c13676c09e286c9a387f9 (patch)
tree5a8bf7762e0e975c614d1be05d78f6c3a4c706c2 /packages/integrations/cloudflare/test/routes-json.test.js
parenta76194514b89d273a44e8b397b792bbb0c10ee47 (diff)
downloadastro-03f15c41f13b7b707e2c13676c09e286c9a387f9.tar.gz
astro-03f15c41f13b7b707e2c13676c09e286c9a387f9.tar.zst
astro-03f15c41f13b7b707e2c13676c09e286c9a387f9.zip
chore: update adapters to better support astro v5 (#454)
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Diffstat (limited to 'packages/integrations/cloudflare/test/routes-json.test.js')
-rw-r--r--packages/integrations/cloudflare/test/routes-json.test.js111
1 files changed, 106 insertions, 5 deletions
diff --git a/packages/integrations/cloudflare/test/routes-json.test.js b/packages/integrations/cloudflare/test/routes-json.test.js
index 7cf69f8cc..c2910ceb7 100644
--- a/packages/integrations/cloudflare/test/routes-json.test.js
+++ b/packages/integrations/cloudflare/test/routes-json.test.js
@@ -23,7 +23,7 @@ describe('_routes.json generation', () => {
assert.deepEqual(routes, {
version: 1,
- include: ['/_image', '/a/*'],
+ include: ['/_server-islands/*', '/_image', '/a/*'],
exclude: ['/_astro/*', '/redirectme', '/public.txt', '/a', '/a/redirect', '/404', '/b'],
});
});
@@ -101,7 +101,7 @@ describe('_routes.json generation', () => {
assert.deepEqual(routes, {
version: 1,
- include: ['/_image', '/a/*', '/another'],
+ include: ['/_server-islands/*', '/_image', '/a/*', '/another'],
exclude: ['/_astro/*', '/redirectme', '/public.txt', '/a', '/a/redirect', '/404', '/b'],
});
});
@@ -131,7 +131,7 @@ describe('_routes.json generation', () => {
assert.deepEqual(routes, {
version: 1,
- include: ['/_image', '/a/*'],
+ include: ['/_server-islands/*', '/_image', '/a/*'],
exclude: [
'/_astro/*',
'/redirectme',
@@ -167,6 +167,7 @@ describe('_routes.json generation', () => {
version: 1,
include: [
'/',
+ '/_server-islands/*',
'/_image',
'/dynamicPages/*',
'/mixedPages/dynamic',
@@ -234,8 +235,108 @@ describe('_routes.json generation', () => {
assert.deepEqual(routes, {
version: 1,
- include: ['/_image', '/dynamic'],
- exclude: [],
+ include: ['/*'],
+ exclude: [
+ '/_astro/*',
+ '/redirectme',
+ '/public.txt',
+ '/a/*',
+ '/404',
+ '/0',
+ '/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',
+ '/34',
+ '/35',
+ '/36',
+ '/37',
+ '/38',
+ '/39',
+ '/40',
+ '/41',
+ '/42',
+ '/43',
+ '/44',
+ '/45',
+ '/46',
+ '/47',
+ '/48',
+ '/49',
+ '/50',
+ '/51',
+ '/52',
+ '/53',
+ '/54',
+ '/55',
+ '/56',
+ '/57',
+ '/58',
+ '/59',
+ '/60',
+ '/61',
+ '/62',
+ '/63',
+ '/64',
+ '/65',
+ '/66',
+ '/67',
+ '/68',
+ '/69',
+ '/70',
+ '/71',
+ '/72',
+ '/73',
+ '/74',
+ '/75',
+ '/76',
+ '/77',
+ '/78',
+ '/79',
+ '/80',
+ '/81',
+ '/82',
+ '/83',
+ '/84',
+ '/85',
+ '/86',
+ '/87',
+ '/88',
+ '/89',
+ '/90',
+ '/91',
+ '/92',
+ '/93',
+ ],
});
});
});