Skip to content

Commit 53ed926

Browse files
refactor: rephrase error message (#2204)
1 parent 988d83d commit 53ed926

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/webpack-cli/lib/webpack-cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class WebpackCLI {
194194

195195
if (notfoundConfigNames.length > 0) {
196196
logger.error(
197-
notfoundConfigNames.map((configName) => `Configuration with the "${configName}" name was not found.`).join(' '),
197+
notfoundConfigNames.map((configName) => `Configuration with the name "${configName}" was not found.`).join(' '),
198198
);
199199
process.exit(2);
200200
}

test/config-name/config-name.test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('--config-name flag', () => {
5151
expect(exitCode).toBe(2);
5252
expect(stderr).not.toContain('Compilation starting...');
5353
expect(stderr).not.toContain('Compilation finished');
54-
expect(stderr).toContain('Configuration with the "test" name was not found.');
54+
expect(stderr).toContain('Configuration with the name "test" was not found.');
5555
expect(stdout).toBeFalsy();
5656
});
5757

@@ -61,7 +61,7 @@ describe('--config-name flag', () => {
6161
expect(exitCode).toBe(2);
6262
expect(stderr).not.toContain('Compilation starting...');
6363
expect(stderr).not.toContain('Compilation finished');
64-
expect(stderr).toContain('Configuration with the "test" name was not found.');
64+
expect(stderr).toContain('Configuration with the name "test" was not found.');
6565
expect(stdout).toBeFalsy();
6666
});
6767

@@ -75,8 +75,8 @@ describe('--config-name flag', () => {
7575
expect(exitCode).toBe(2);
7676
expect(stderr).not.toContain('Compilation starting...');
7777
expect(stderr).not.toContain('Compilation finished');
78-
expect(stderr).toContain('Configuration with the "test" name was not found.');
79-
expect(stderr).toContain('Configuration with the "bar" name was not found.');
78+
expect(stderr).toContain('Configuration with the name "test" was not found.');
79+
expect(stderr).toContain('Configuration with the name "bar" was not found.');
8080
expect(stdout).toBeFalsy();
8181
});
8282

@@ -90,8 +90,8 @@ describe('--config-name flag', () => {
9090
expect(exitCode).toBe(2);
9191
expect(stderr).not.toContain('Compilation starting...');
9292
expect(stderr).not.toContain('Compilation finished');
93-
expect(stderr).not.toContain('Configuration with the "first" name was not found.');
94-
expect(stderr).toContain('Configuration with the "bar" name was not found.');
93+
expect(stderr).not.toContain('Configuration with the name "first" was not found.');
94+
expect(stderr).toContain('Configuration with the name "bar" was not found.');
9595
expect(stdout).toBeFalsy();
9696
});
9797

@@ -129,7 +129,7 @@ describe('--config-name flag', () => {
129129
expect(exitCode).toBe(2);
130130
expect(stderr).not.toContain('Compilation starting...');
131131
expect(stderr).not.toContain('Compilation finished');
132-
expect(stderr).toContain('Configuration with the "test" name was not found.');
132+
expect(stderr).toContain('Configuration with the name "test" was not found.');
133133
expect(stdout).toBeFalsy();
134134
});
135135
});

0 commit comments

Comments
 (0)