We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
relativeSelector
1 parent 1c1f7f2 commit 690f40bCopy full SHA for 690f40b
test/api.ts
@@ -108,6 +108,13 @@ describe("API", () => {
108
expect(() => CSSselect.compile("::after")).toThrow("not supported");
109
});
110
111
+ it("should throw an error if encountering a traversal-first selector with relative selectors disabled", () =>
112
+ expect(() =>
113
+ CSSselect.compile("> p", { relativeSelector: false })
114
+ ).toThrow(
115
+ "Relative selectors are not allowed when the `relativeSelector` option is disabled"
116
+ ));
117
+
118
it("should throw with a column combinator", () => {
119
expect(() => CSSselect.compile("foo || bar")).toThrow(notYet);
120
0 commit comments