Last change
on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
844 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | var _helpers = require("./util/helpers");
|
---|
| 4 |
|
---|
| 5 | (0, _helpers.test)('escaped semicolon in class', '.\\;', function (t, tree) {
|
---|
| 6 | t.deepEqual(tree.nodes[0].nodes[0].value, ';');
|
---|
| 7 | t.deepEqual(tree.nodes[0].nodes[0].raws.value, '\\;');
|
---|
| 8 | t.deepEqual(tree.nodes[0].nodes[0].type, 'class');
|
---|
| 9 | });
|
---|
| 10 | (0, _helpers.test)('escaped semicolon in id', '#\\;', function (t, tree) {
|
---|
| 11 | t.deepEqual(tree.nodes[0].nodes[0].value, ';');
|
---|
| 12 | t.deepEqual(tree.nodes[0].nodes[0].raws.value, '\\;');
|
---|
| 13 | t.deepEqual(tree.nodes[0].nodes[0].type, 'id');
|
---|
| 14 | }); // This is a side-effect of allowing media queries to be parsed. Not sure it shouldn't just be an error.
|
---|
| 15 |
|
---|
| 16 | (0, _helpers.test)('bare parens capture contents as a string', '(h1)', function (t, tree) {
|
---|
| 17 | t.deepEqual(tree.nodes[0].nodes[0].value, '(h1)');
|
---|
| 18 | t.deepEqual(tree.nodes[0].nodes[0].type, 'string');
|
---|
| 19 | }); |
---|
Note:
See
TracBrowser
for help on using the repository browser.