Skip to content

Commit

Permalink
tests(bin): add webpack.config.ts 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 7580b48 commit 8dc5999
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/binCases/config-location/webpack-ts-config/index2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = "webpack-ts-config";
5 changes: 5 additions & 0 deletions test/binCases/config-location/webpack-ts-config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"esModuleInterop": true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"use strict";

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

test("webpack-ts-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,8 @@
import path from "path";
import webpack from "webpack";

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

export default config;

0 comments on commit 8dc5999

Please sign in to comment.