Skip to content

Commit 7f6cc62

Browse files
committed
test: mask file hashes to not have to update assertion everytime dependencies are updated
1 parent 99ee34c commit 7f6cc62

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

demo.test.mjs

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ import { test } from 'node:test'
44
test('edge function config', async () => {
55
const { config } = await import('./demo/.netlify/edge-functions/angular-ssr/angular-ssr.mjs')
66

7-
assert.deepEqual(config.excludedPath, [
7+
const excludedPathsWithMaskedHashes = config.excludedPath.map((path) => path.replace(/-[A-Z\d]{8}\./, '-HASHHASH.'))
8+
9+
assert.deepEqual(excludedPathsWithMaskedHashes, [
810
'/.netlify/*',
911
'/favicon.ico',
1012
'/heroes/index.html',
1113
'/index.csr.html',
12-
'/main-KVCR6MBP.js',
13-
'/polyfills-FFHMD2TL.js',
14-
'/styles-5INURTSO.css',
14+
'/main-HASHHASH.js',
15+
'/polyfills-HASHHASH.js',
16+
'/styles-HASHHASH.css',
1517
'/heroes',
1618
])
1719
})

0 commit comments

Comments
 (0)