Adding a jest transform to handle yaml files

This commit is contained in:
Jeff Avallone committed 2019-03-23 18:51:32 -04:00
1 parent b5cde63e4e
commit 2f7c67c953
3 files changed
+10 -1

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
const yaml = require('js-yaml');
module.exports = {
process(src) {
return `module.exports = ${ JSON.stringify(yaml.safeLoad(src)) };`;
}
};