Skip to content

Commit

Permalink
convert test case to normal function for node.js 6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Dec 4, 2018
1 parent 162da1c commit 56feccc
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions test/cases/loaders/resolve/loader.js
@@ -1,11 +1,16 @@
const path = require("path");
module.exports = async function() {
module.exports = function() {
const resolve1 = this.getResolve();
const resolve2 = this.getResolve({
extensions: [".xyz", ".js"]
});
return `module.exports = ${JSON.stringify({
one: path.basename(await resolve1(__dirname, "./index")),
two: path.basename(await resolve2(__dirname, "./index")),
})}`;
return Promise.all([
resolve1(__dirname, "./index"),
resolve2(__dirname, "./index")
]).then(([one, two]) => {
return `module.exports = ${JSON.stringify({
one: path.basename(one),
two: path.basename(two),
})}`;
});
};

0 comments on commit 56feccc

Please sign in to comment.