MCPcopy Create free account
hub / github.com/cypress-io/cypress / getTestEncryptionKey

Function getTestEncryptionKey

scripts/binary/binary-sources.js:10–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8const NON_LATIN1 = /[^\0-\xff]/
9
10const getTestEncryptionKey = async () => {
11 const encryptionSource = await fs.readFile(path.join(__dirname, '../../packages/server/lib/cloud/encryption.ts'), 'utf8')
12 const testKey = encryptionSource.match(/const CY_TEST = `(.*?)`/)?.[1]
13
14 if (!testKey) {
15 throw new Error(`Expected to find the test key in cloud encryption.ts`)
16 }
17
18 return testKey
19}
20
21// Checks the bundles and every other file the binary ships under packages/server, so a new read of a local override
22// that is missing from the rewrites, or a dependency change that makes a bundle two-byte, fails the build

Callers 1

Calls 3

readFileMethod · 0.80
joinMethod · 0.80
matchMethod · 0.80

Tested by

no test coverage detected