Skip to content

Commit 8a79ec6

Browse files
developher-netnathanhleung
authored andcommitted
test: improve regex matching for checking --save-dev flags
1 parent 1b386d5 commit 8a79ec6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cli.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ test("adds explicit `--save-dev` flag when using `-D, -d, --dev` with NPM", asyn
130130
flags.map(flag => getCliInstallCommand(["eslint-config-airbnb", flag]))
131131
);
132132
commands.forEach((command, i) =>
133-
t.equal(/ --save-dev /.test(command), true, `flag: \`${flags[i]}\``)
133+
t.equal(/ --save-dev\b/.test(command), true, `flag: \`${flags[i]}\``)
134134
);
135135
} catch (err) {
136136
t.fail(err);

0 commit comments

Comments
 (0)