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

Method save

lib/result.js:214–217  ·  view source on GitHub ↗

* Saves this result to a JSON file. * * @param {string} [fileName] Path to the JSON file, relative to `output_dir`. Defaults to "result.json".

(fileName)

Source from the content-addressed store, hash-verified

212 * @param {string} [fileName] Path to the JSON file, relative to `output_dir`. Defaults to "result.json".
213 */
214 save(fileName) {
215 if (!fileName) fileName = 'result.json'
216 fs.writeFileSync(path.join(store.outputDir, fileName), JSON.stringify(this.simplify(), null, 2))
217 }
218
219 /**
220 * Adds stats to this result.

Callers 3

onTestFinishedFunction · 0.45
parseInputFunction · 0.45
customReporter.jsFile · 0.45

Calls 1

simplifyMethod · 0.95

Tested by

no test coverage detected