Skip to content

Commit f7dd0e7

Browse files
committed
chore: add a test for CLI parsing to avoid regressions
CLI parsing doesn't have that issue but, in case we refactor add a test to ensure we don't regress here.
1 parent 42d435f commit f7dd0e7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/unit/common/config.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ describe("config", () => {
7474
});
7575

7676
describe("cli parsing", () => {
77+
it("should not try to parse a multiple-host urls", () => {
78+
const actual = setupUserConfig({
79+
cli: ["myself", "--", "--connectionString", "mongodb://user:password@host1,host2,host3/"],
80+
env: {},
81+
defaults: defaultUserConfig,
82+
});
83+
84+
expect(actual.connectionString).toEqual("mongodb://user:password@host1,host2,host3/");
85+
});
86+
7787
describe("string use cases", () => {
7888
const testCases = [
7989
{

0 commit comments

Comments
 (0)