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

Function getEncryptionFileSource

scripts/binary/binary-sources.js:56–64  ·  view source on GitHub ↗
(encryptionFilePath)

Source from the content-addressed store, hash-verified

54}
55
56const getEncryptionFileSource = async (encryptionFilePath) => {
57 const fileContents = await fs.readFile(encryptionFilePath, 'utf8')
58
59 if (!fileContents.includes(`test: CY_TEST,`)) {
60 throw new Error(`Expected to find test key in cloud encryption file`)
61 }
62
63 return fileContents.replace(`test: CY_TEST,`, '').replace(/const CY_TEST = `(.*?)`/, '')
64}
65
66const validateEncryptionFile = async (encryptionFilePath) => {
67 const afterReplaceEncryption = await fs.readFile(encryptionFilePath, 'utf8')

Callers

nothing calls this directly

Calls 1

readFileMethod · 0.80

Tested by

no test coverage detected