Skip to content

Commit

Permalink
tests(bin): add webpack.config.babel.js related test (webpack#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
lakatostamas committed Jan 6, 2019
1 parent d1fedf8 commit 12e602d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = "webpack-babel-config";
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"use strict";

const { run } = require("../../../testUtils");

test("webpack-babel-config", () => {
const { code, stdout, stderr } = run(__dirname, [
"--output-filename",
"[name].js",
"--output-chunk-filename",
"[id].chunk.js",
"--target",
"async-node",
]);
expect(code).toBe(0);
expect(stdout).toContain("./index2.js");
expect(stderr).toHaveLength(0);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// eslint-disable-next-line node/no-unsupported-features, node/no-unsupported-features/es-syntax
import path from "path";

const config = {
entry: path.resolve(__dirname, "./index2")
};

// eslint-disable-next-line node/no-unsupported-features, node/no-unsupported-features/es-syntax
export default config;

0 comments on commit 12e602d

Please sign in to comment.