Storyshots: escape Windows fileNames

Issue: `multisnapshotWithOptions` + CSF doesn't work on Windows
This commit is contained in:
Filipp Riabchun 2019-12-04 19:42:20 +01:00 committed by GitHub
parent 6b18e28a75
commit f623cd12d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@ module.exports = {
return `${code};
if(exports.default != null) {
exports.default.parameters = exports.default.parameters || {};
exports.default.parameters.fileName = '${fileName}';
exports.default.parameters.fileName = '${fileName.replace(/\\/g, '\\\\')}';
}
`;
},