We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d005f9 commit 085a0b8Copy full SHA for 085a0b8
src/options.test.ts
@@ -4,12 +4,13 @@ import { parse } from "./parse.ts";
4
// https://github.com/eemeli/yaml/blob/main/src/schema/yaml-1.1/merge.ts
5
test(`duplicate '<<' keys should always be allowed`, () => {
6
const text = "<<: 1\n<<: 2";
7
- expect(parse(text)).toBeDefined();
8
- expect(parse(text, { uniqueKeys: false })).toBeDefined();
9
- const ast = parse(text, { uniqueKeys: true });
+ const ast = parse(text);
10
expect(ast).toBeDefined();
11
const node = ast.children[0].children[1].children[0];
12
expect(node?.type).toBe("mapping");
+
+ expect(parse(text, { uniqueKeys: true })).toStrictEqual(ast);
13
+ expect(parse(text, { uniqueKeys: false })).toStrictEqual(ast);
14
});
15
16
for (const { type, text } of [
0 commit comments