Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions demo.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ import { test } from 'node:test'
test('edge function config', async () => {
const { config } = await import('./demo/.netlify/edge-functions/angular-ssr/angular-ssr.mjs')

assert.deepEqual(config.excludedPath, [
const excludedPathsWithMaskedHashes = config.excludedPath.map((path) => path.replace(/-[A-Z\d]{8}\./, '-HASHHASH.'))

assert.deepEqual(excludedPathsWithMaskedHashes, [
'/.netlify/*',
'/favicon.ico',
'/heroes/index.html',
'/index.csr.html',
'/main-KVCR6MBP.js',
'/polyfills-FFHMD2TL.js',
'/styles-5INURTSO.css',
'/main-HASHHASH.js',
'/polyfills-HASHHASH.js',
'/styles-HASHHASH.css',
Comment on lines +7 to +16
Copy link
Contributor Author

@pieh pieh Feb 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checking concrete hashes here is causing problems so instead I do mask hash to ensure to still be able to ensure that expected static assets are produced and excluded from function configuration so we don't have to update assertions with each Angular version bump

'/heroes',
])
})
Loading