MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / seeInThisFile

Method seeInThisFile

lib/helper/FileSystem.js:139–142  ·  view source on GitHub ↗

* Checks that file found by `seeFile` includes a text. * @param {string} text * @param {string} [encoding='utf8']

(text, encoding = 'utf8')

Source from the content-addressed store, hash-verified

137 * @param {string} [encoding='utf8']
138 */
139 seeInThisFile(text, encoding = 'utf8') {
140 const content = getFileContents(this.file, encoding)
141 fileIncludes(this.file).assert(text, content)
142 }
143
144 /**
145 * Checks that file found by `seeFile` doesn't include text.

Callers 1

FileSystem_test.jsFile · 0.80

Calls 3

fileIncludesFunction · 0.90
getFileContentsFunction · 0.85
assertMethod · 0.80

Tested by

no test coverage detected