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

Method seeFileNameMatching

lib/helper/FileSystem.js:127–132  ·  view source on GitHub ↗

* Checks that file with a name including given text exists in the current directory. * *```js * I.handleDownloads(); * I.click('Download as PDF'); * I.amInPath('output/downloads'); * I.seeFileNameMatching('.pdf'); * ``` * @param {string} text

(text)

Source from the content-addressed store, hash-verified

125 * @param {string} text
126 */
127 seeFileNameMatching(text) {
128 assert.ok(
129 this.grabFileNames().some(file => file.includes(text)),
130 `File name which contains ${text} not found in ${this.dir}`,
131 )
132 }
133
134 /**
135 * Checks that file found by `seeFile` includes a text.

Callers 1

FileSystem_test.jsFile · 0.80

Calls 2

grabFileNamesMethod · 0.95
includesMethod · 0.80

Tested by

no test coverage detected