Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handlers,
imageDir,
cssDir,
headlessFlag,
browserType,
puppeteerArgs
}
}: {
file: PathLike;
options: RunningOptions;
}) {
const originalBuffer = fs.readFileSync(file);
const originalYaml = originalBuffer.toString();
const convertedYaml = convert(originalYaml);
const doc = yaml.safeLoad(convertedYaml);
if (doc.skip) {
console.log(`${file} skip...`);
return;
}
if (doc.onlyBrowser && !doc.onlyBrowser.includes(browserType)) {
console.log(
`this scenario only browser ${doc.onlyBrowser} ${file} skip...`
);
return;
}
if (!doc.name) {
console.error(`scenario: ${file} must be set name prop`);
return;
}