Skip to content

Commit a1d7faa

Browse files
committed
add a test for multiple namespaces
1 parent fddc5f6 commit a1d7faa

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ describe('Basic functionality', () => {
4141
it('does not apply if computed namespace is falsy', () => {
4242
transformSnapshot('.foo {}', { namespace: file => !!file })
4343
})
44+
45+
it('works with multiple namespaces', () => {
46+
transformSnapshot('.selector {}', { namespace: '.foo, .bar' })
47+
})
4448
})
4549

4650
describe(':root', () => {

tests/test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ exports[`Basic functionality works with a regexp which matches multiple selector
8080
"
8181
`;
8282

83+
exports[`Basic functionality works with multiple namespaces 1`] = `".foo .selector, .bar .selector {}"`;
84+
8385
exports[`SCSS @for does work with @for and nested @for rules 1`] = `
8486
".my-component .pony {
8587
@for $i from 1 through 3 {

0 commit comments

Comments
 (0)