The actual snapshot is saved in snapshots.ts.snap
.
Generated by AVA.
parse1('*')
{
list: [
{
namespace: null,
specificity: [
0,
0,
0,
],
type: 'universal',
},
],
specificity: [
0,
0,
0,
],
type: 'compound',
}
parse1('|*')
{
list: [
{
namespace: '',
specificity: [
0,
0,
0,
],
type: 'universal',
},
],
specificity: [
0,
0,
0,
],
type: 'compound',
}
parse1('foo|*')
{
list: [
{
namespace: 'foo',
specificity: [
0,
0,
0,
],
type: 'universal',
},
],
specificity: [
0,
0,
0,
],
type: 'compound',
}
parse1('foo|bar')
{
list: [
{
name: 'bar',
namespace: 'foo',
specificity: [
0,
0,
1,
],
type: 'tag',
},
],
specificity: [
0,
0,
1,
],
type: 'compound',
}
parse1('.class')
{
list: [
{
name: 'class',
specificity: [
0,
1,
0,
],
type: 'class',
},
],
specificity: [
0,
1,
0,
],
type: 'compound',
}
parse1('#id')
{
list: [
{
name: 'id',
specificity: [
1,
0,
0,
],
type: 'id',
},
],
specificity: [
1,
0,
0,
],
type: 'compound',
}
parse1('[attr]')
{
list: [
{
name: 'attr',
namespace: null,
specificity: [
0,
1,
0,
],
type: 'attrPresence',
},
],
specificity: [
0,
1,
0,
],
type: 'compound',
}
parse1('[attr $= "value"]')
{
list: [
{
matcher: '$=',
modifier: null,
name: 'attr',
namespace: null,
specificity: [
0,
1,
0,
],
type: 'attrValue',
value: 'value',
},
],
specificity: [
0,
1,
0,
],
type: 'compound',
}
parse1('[attr $= "value" S]')
{
list: [
{
matcher: '$=',
modifier: 's',
name: 'attr',
namespace: null,
specificity: [
0,
1,
0,
],
type: 'attrValue',
value: 'value',
},
],
specificity: [
0,
1,
0,
],
type: 'compound',
}
parse1('p.class#id[attr][attr2^=value]')
{
list: [
{
name: 'p',
namespace: null,
specificity: [
0,
0,
1,
],
type: 'tag',
},
{
name: 'class',
specificity: [
0,
1,
0,
],
type: 'class',
},
{
name: 'id',
specificity: [
1,
0,
0,
],
type: 'id',
},
{
name: 'attr',
namespace: null,
specificity: [
0,
1,
0,
],
type: 'attrPresence',
},
{
matcher: '^=',
modifier: null,
name: 'attr2',
namespace: null,
specificity: [
0,
1,
0,
],
type: 'attrValue',
value: 'value',
},
],
specificity: [
1,
3,
1,
],
type: 'compound',
}
parse1('.foo || .bar .baz + .qux')
{
list: [
{
name: 'qux',
specificity: [
0,
1,
0,
],
type: 'class',
},
{
combinator: '+',
left: {
list: [
{
name: 'baz',
specificity: [
0,
1,
0,
],
type: 'class',
},
{
combinator: ' ',
left: {
list: [
{
name: 'bar',
specificity: [
0,
1,
0,
],
type: 'class',
},
{
combinator: '||',
left: {
list: [
{
name: 'foo',
specificity: [
0,
1,
0,
],
type: 'class',
},
],
specificity: [
0,
1,
0,
],
type: 'compound',
},
specificity: [
0,
1,
0,
],
type: 'combinator',
},
],
specificity: [
0,
2,
0,
],
type: 'compound',
},
specificity: [
0,
2,
0,
],
type: 'combinator',
},
],
specificity: [
0,
3,
0,
],
type: 'compound',
},
specificity: [
0,
3,
0,
],
type: 'combinator',
},
],
specificity: [
0,
4,
0,
],
type: 'compound',
}
parse('.foo,.bar,.baz')
{
list: [
{
list: [
{
name: 'foo',
specificity: [
0,
1,
0,
],
type: 'class',
},
],
specificity: [
0,
1,
0,
],
type: 'compound',
},
{
list: [
{
name: 'bar',
specificity: [
0,
1,
0,
],
type: 'class',
},
],
specificity: [
0,
1,
0,
],
type: 'compound',
},
{
list: [
{
name: 'baz',
specificity: [
0,
1,
0,
],
type: 'class',
},
],
specificity: [
0,
1,
0,
],
type: 'compound',
},
],
type: 'list',
}
parse1('.♫ .\" .\22\22 \.22 .\000022 22\ \+\ 22\ ')
{
list: [
{
name: '"22 + 22 ',
specificity: [
0,
1,
0,
],
type: 'class',
},
{
combinator: ' ',
left: {
list: [
{
name: '"".22',
specificity: [
0,
1,
0,
],
type: 'class',
},
{
combinator: ' ',
left: {
list: [
{
name: '"',
specificity: [
0,
1,
0,
],
type: 'class',
},
{
combinator: ' ',
left: {
list: [
{
name: '♫',
specificity: [
0,
1,
0,
],
type: 'class',
},
],
specificity: [
0,
1,
0,
],
type: 'compound',
},
specificity: [
0,
1,
0,
],
type: 'combinator',
},
],
specificity: [
0,
2,
0,
],
type: 'compound',
},
specificity: [
0,
2,
0,
],
type: 'combinator',
},
],
specificity: [
0,
3,
0,
],
type: 'compound',
},
specificity: [
0,
3,
0,
],
type: 'combinator',
},
],
specificity: [
0,
4,
0,
],
type: 'compound',
}
parse1('.👩🚀\d83d\dc69\200d\d83d\de80 \1f469\200d\1f680')
{
list: [
{
name: '👩🚀👩🚀👩🚀',
specificity: [
0,
1,
0,
],
type: 'class',
},
],
specificity: [
0,
1,
0,
],
type: 'compound',
}