Adding a jest transform to handle yaml files

This commit is contained in:
Jeff Avallone
2019-03-23 18:51:32 -04:00
parent b5cde63e4e
commit 2f7c67c953
3 changed files with 10 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
const yaml = require('js-yaml');
module.exports = {
process(src) {
return `module.exports = ${ JSON.stringify(yaml.safeLoad(src)) };`;
}
};