source: trip-planner-front/node_modules/postcss-selector-parser/dist/__tests__/escapes.js@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 844 bytes
Line 
1"use strict";
2
3var _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.