Plugin of snapy.
Test runner for node.
// ./test/snapy.config.jsmodule.exports={// …// Pipes all output to terminal during testing. Usefull when developing snapy pluginsdirectOutput: false,// Boolean// build target for webpack
webpack.target: "node",// String// …}the test files will be bundled, thus __filename and __dirname won't work as expected.
The same is true for all relatively required files:
// test/test.jsrequire("../lib/file.js")// lib/file.jsconsole.log(__dirname)// will output . instead of lib/You can disable bundling by prefixing a !.
This will also exclude it from the change detection.
// test/test.jsrequire("!../lib/file.js")Copyright (c) 2017 Paul Pflugradt Licensed under the MIT license.