1 | "use strict";
|
---|
2 |
|
---|
3 | var _helpers = require("./util/helpers");
|
---|
4 |
|
---|
5 | // Unclosed elements
|
---|
6 | (0, _helpers["throws"])('unclosed string', 'a[href="wow]');
|
---|
7 | (0, _helpers["throws"])('unclosed comment', '/* oops');
|
---|
8 | (0, _helpers["throws"])('unclosed pseudo element', 'button::');
|
---|
9 | (0, _helpers["throws"])('unclosed pseudo class', 'a:');
|
---|
10 | (0, _helpers["throws"])('unclosed attribute selector', '[name="james"][href');
|
---|
11 | (0, _helpers["throws"])('no opening parenthesis', ')');
|
---|
12 | (0, _helpers["throws"])('no opening parenthesis (2)', ':global.foo)');
|
---|
13 | (0, _helpers["throws"])('no opening parenthesis (3)', 'h1:not(h2:not(h3)))');
|
---|
14 | (0, _helpers["throws"])('no opening square bracket', ']');
|
---|
15 | (0, _helpers["throws"])('no opening square bracket (2)', ':global.foo]');
|
---|
16 | (0, _helpers["throws"])('no opening square bracket (3)', '[global]]');
|
---|
17 | (0, _helpers["throws"])('bad pseudo element', 'button::"after"');
|
---|
18 | (0, _helpers["throws"])('missing closing parenthesis in pseudo', ':not([attr="test"]:not([attr="test"])');
|
---|
19 | (0, _helpers["throws"])('bad syntax', '-moz-osx-font-smoothing: grayscale');
|
---|
20 | (0, _helpers["throws"])('bad syntax (2)', '! .body');
|
---|
21 | (0, _helpers["throws"])('missing backslash for semicolon', '.;');
|
---|
22 | (0, _helpers["throws"])('missing backslash for semicolon (2)', '.\;');
|
---|
23 | (0, _helpers["throws"])('unexpected / foo', '-Option\/root', "Unexpected '/'. Escaping special characters with \\ may help.");
|
---|
24 | (0, _helpers["throws"])('bang in selector', '.foo !optional', "Unexpected '!'. Escaping special characters with \\ may help."); |
---|