Skip to content
Merged
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
5 changes: 4 additions & 1 deletion test/integration/fixture/attestations/verify-packed.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ const { readFileSync } = require('node:fs')
const { createRequire } = require('node:module')
const path = require('node:path')
const { pathToFileURL } = require('node:url')
// The evidence gate requires `require` in call position, so read the shared
// module cache through an untracked binding instead of `require.cache`.
const moduleCache = require('node:module')._cache

async function main() {
const { 2: packagePath, 3: fixturePath } = process.argv
Expand All @@ -15,7 +18,7 @@ async function main() {
'2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824',
)
const isLoaded = () =>
Object.keys(require.cache).some(name =>
Object.keys(moduleCache).some(name =>
name.endsWith(path.join('external', 'sigstore-verify.js')),
)
assert.equal(isLoaded(), false)
Expand Down
Loading