Skip to content

Commit c04df9d

Browse files
committed
test: update test for keys with -
1 parent e056ca4 commit c04df9d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/parse.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ describe("parseRawArgs", () => {
77
[`no-foo`, { foo: false }],
88
[`foo="bar"`, { foo: "bar" }],
99
[`foo=bar`, { foo: "bar" }],
10+
[
11+
`a-key=a-value another-key=another-value`,
12+
{ "a-key": "a-value", "another-key": "another-value" },
13+
],
1014
] as const;
1115
for (const [input, expected] of tests) {
1216
it(`${JSON.stringify(input)} => ${JSON.stringify(expected)}`, () => {
@@ -21,7 +25,7 @@ describe("findAutoMdBlocks", () => {
2125
(a)
2226
<!-- /automd -->
2327
24-
<!-- automd:pm-install dev -->
28+
<!-- automd:pm-install dev no-auto -->
2529
(b)
2630
<!-- /automd -->
2731
@@ -41,7 +45,9 @@ describe("findAutoMdBlocks", () => {
4145
it("should find all blocks", () => {
4246
const blocks = findAutoMdBlocks(fixture);
4347
expect(blocks[0]).toMatchObject(mkBlock("pm-x", "args=.", "(a)"));
44-
expect(blocks[1]).toMatchObject(mkBlock("pm-install", "dev", "(b)"));
48+
expect(blocks[1]).toMatchObject(
49+
mkBlock("pm-install", "dev no-auto", "(b)"),
50+
);
4551
expect(blocks[2]).toMatchObject(mkBlock("jsdocs", "", "(c)"));
4652
});
4753
});

0 commit comments

Comments
 (0)