Skip to content

Commit

Permalink
Add isNestedSelector test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenh committed Jan 25, 2025
1 parent 5fa8f4c commit d2b8075
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/fela-utils/src/__tests__/isNestedSelector-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ describe('Validating nested selectors', () => {
expect(isNestedSelector('> div')).toEqual(true)
expect(isNestedSelector('& .foo')).toEqual(true)
expect(isNestedSelector('& ~ #id')).toEqual(true)
expect(isNestedSelector('.foo &')).toEqual(true)
})

it('should return false', () => {
expect(isNestedSelector('.foo')).toEqual(false)
expect(isNestedSelector(' .foo')).toEqual(false)
expect(isNestedSelector('~ #id')).toEqual(false)
expect(isNestedSelector('#id & .foo')).toEqual(false)
})
})

0 comments on commit d2b8075

Please sign in to comment.