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

Function getProtocolFileSource

scripts/binary/binary-sources.js:98–106  ·  view source on GitHub ↗
(protocolFilePath)

Source from the content-addressed store, hash-verified

96}
97
98const getProtocolFileSource = async (protocolFilePath) => {
99 const fileContents = await fs.readFile(protocolFilePath, 'utf8')
100
101 if (!fileContents.includes('process.env.CYPRESS_LOCAL_PROTOCOL_PATH')) {
102 throw new Error(`Expected to find CYPRESS_LOCAL_PROTOCOL_PATH in protocol file`)
103 }
104
105 return fileContents.replaceAll('process.env.CYPRESS_LOCAL_PROTOCOL_PATH', 'undefined')
106}
107
108const getStudioFileSource = async (studioFilePath) => {
109 const fileContents = await fs.readFile(studioFilePath, 'utf8')

Callers

nothing calls this directly

Calls 1

readFileMethod · 0.80

Tested by

no test coverage detected