Skip to content

Commit

Permalink
test: update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Jul 25, 2022
1 parent e02dfea commit 9d1f8c1
Show file tree
Hide file tree
Showing 9 changed files with 973 additions and 938 deletions.
6 changes: 4 additions & 2 deletions test/build/core-flags/core-flags.test.js
Expand Up @@ -239,15 +239,17 @@ describe("core flags", () => {
expect(stdout).toContain(`devtool: 'source-map'`);
});

it("should allow string value devtool option using alias", async () => {
// TODO: Enable alias with webpack 5
it.skip("should allow string value devtool option using alias", async () => {
const { exitCode, stderr, stdout } = await run(__dirname, ["-d", "source-map"]);

expect(exitCode).toBe(0);
expect(stderr).toBeFalsy();
expect(stdout).toContain(`devtool: 'source-map'`);
});

it("should allow string value devtool option using alias #1", async () => {
// TODO: Enable alias with webpack 5
it.skip("should allow string value devtool option using alias #1", async () => {
// cSpell:ignore dsource
const { exitCode, stderr, stdout } = await run(__dirname, ["-dsource-map"]);

Expand Down
2 changes: 1 addition & 1 deletion test/build/defaults/output-defaults.test.js
Expand Up @@ -38,7 +38,7 @@ describe("output flag defaults", () => {
]);

expect(exitCode).toBe(2);
expect(stderr).toContain("Error: Option '-o, --output-path <value>' argument missing");
expect(stderr).toContain("Error: Option '--output-path <value>' argument missing");
expect(stdout).toBeFalsy();
});
});
4 changes: 2 additions & 2 deletions test/build/devtool/object/source-map-object.test.js
Expand Up @@ -34,7 +34,7 @@ describe("source-map object", () => {
it("should override config with source-map", async () => {
const { exitCode, stderr, stdout } = await run(
__dirname,
["-c", "./webpack.eval.config.js", "--devtool", "source-map", "-o", "./binary"],
["-c", "./webpack.eval.config.js", "--devtool", "source-map", "--output-path", "./binary"],
false,
);

Expand All @@ -47,7 +47,7 @@ describe("source-map object", () => {
it("should override config with devtool false", async () => {
const { exitCode, stderr, stdout } = await run(
__dirname,
["-c", "./webpack.eval.config.js", "--no-devtool", "-o", "./binary"],
["-c", "./webpack.eval.config.js", "--no-devtool", "--output-path", "./binary"],
false,
);

Expand Down
7 changes: 1 addition & 6 deletions test/build/entry/flag-entry/entry-with-flag.test.js
Expand Up @@ -6,12 +6,7 @@ const { resolve } = require("path");

describe("entry flag", () => {
it("should resolve the path to src/index.cjs", async () => {
const { exitCode, stderr, stdout } = await run(__dirname, [
"--entry",
"./src/index.cjs",
"-o",
"./dist/",
]);
const { exitCode, stderr, stdout } = await run(__dirname, ["--entry", "./src/index.cjs"]);

expect(exitCode).toBe(0);
expect(stderr).toBeFalsy();
Expand Down
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`output flag named bundles should output file in bin directory using default webpack config with warning for empty output value: stderr 1`] = `
"[webpack-cli] Error: Option '-o, --output-path <value>' argument missing
"[webpack-cli] Error: Option '--output-path <value>' argument missing
[webpack-cli] Run 'webpack --help' to see available commands and options"
`;

Expand Down
3 changes: 2 additions & 1 deletion test/build/target/flag-test/target-flag.test.js
Expand Up @@ -22,7 +22,8 @@ describe("--target flag", () => {
expect(stdout).toContain(`target: [ '${val}' ]`);
});

it(`should accept ${val} with -t alias`, async () => {
// TODO: Enable aliases with webpack 5
it.skip(`should accept ${val} with -t alias`, async () => {
const { exitCode, stderr, stdout } = await run(__dirname, ["-t", `${val}`]);

expect(exitCode).toBe(0);
Expand Down
1 change: 0 additions & 1 deletion test/build/target/flag-test/webpack.config.js
Expand Up @@ -3,6 +3,5 @@ const WebpackCLITestPlugin = require("../../../utils/webpack-cli-test-plugin");
module.exports = {
entry: "./index.js",
mode: "development",
target: "node",
plugins: [new WebpackCLITestPlugin()],
};
1,033 changes: 528 additions & 505 deletions test/help/__snapshots__/help.test.js.snap.devServer3.webpack5

Large diffs are not rendered by default.

853 changes: 434 additions & 419 deletions test/help/__snapshots__/help.test.js.snap.devServer4.webpack5

Large diffs are not rendered by default.

0 comments on commit 9d1f8c1

Please sign in to comment.