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

Function getEncryptionFileSource

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

Source from the content-addressed store, hash-verified

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

Callers 1

after-pack-hook.jsFile · 0.85

Calls 1

readFileMethod · 0.80

Tested by

no test coverage detected