Skip to content

Commit 8dc5999

Browse files
committed
tests(bin): add webpack.config.ts related test (#724)
1 parent 7580b48 commit 8dc5999

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = "webpack-ts-config";
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"compilerOptions": {
3+
"esModuleInterop": true
4+
}
5+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"use strict";
2+
3+
const { run } = require("../../../testUtils");
4+
5+
test("webpack-ts-config", () => {
6+
const { code, stdout, stderr } = run(__dirname, [
7+
"--output-filename",
8+
"[name].js",
9+
"--output-chunk-filename",
10+
"[id].chunk.js",
11+
"--target",
12+
"async-node",
13+
]);
14+
expect(code).toBe(0);
15+
expect(stdout).toContain("./index2.js");
16+
expect(stderr).toHaveLength(0);
17+
});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import path from "path";
2+
import webpack from "webpack";
3+
4+
const config: webpack.Configuration = {
5+
entry: path.resolve(__dirname, "./index2"),
6+
};
7+
8+
export default config;

0 commit comments

Comments
 (0)