2019-07-03 00:15:15 +02:00
|
|
|
const fs = require("fs");
|
|
|
|
|
|
|
|
module.exports = (config) => ({
|
|
|
|
main: {
|
2019-07-18 09:05:16 +02:00
|
|
|
outputToFile : async ({filename, content}) => {
|
|
|
|
await new Promise((resolve,reject) => {
|
|
|
|
fs.writeFile(`./tests/.data/${filename}`, content, {encoding:"utf8"}, err => {
|
|
|
|
if(err) reject();
|
|
|
|
else resolve(err);
|
|
|
|
});
|
|
|
|
});
|
2019-07-03 00:15:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|