Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove prefix as a function #5829

Merged
merged 4 commits into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove prefix as a function related tests
  • Loading branch information
RobinMalfait committed Oct 19, 2021
commit 6f4a0e04789af5248e9d3d4c0b9c8d15ac0242ed
9 changes: 0 additions & 9 deletions tests/prefix.fn.test.css

This file was deleted.

3 changes: 0 additions & 3 deletions tests/prefix.fn.test.html

This file was deleted.

25 changes: 0 additions & 25 deletions tests/prefix.fn.test.js

This file was deleted.

9 changes: 0 additions & 9 deletions tests/prefixSelector.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ test('it prefixes classes with the provided prefix', () => {
expect(prefix('tw-', '.foo')).toEqual('.tw-foo')
})

test('it handles a function as the prefix', () => {
const prefixFunc = (selector) => {
return selector === '.foo' ? 'tw-' : ''
}

expect(prefix(prefixFunc, '.foo')).toEqual('.tw-foo')
expect(prefix(prefixFunc, '.bar')).toEqual('.bar')
})

test('it properly prefixes selectors with non-standard characters', () => {
expect(prefix('tw-', '.hello\\:world')).toEqual('.tw-hello\\:world')
expect(prefix('tw-', '.foo\\/bar')).toEqual('.tw-foo\\/bar')
Expand Down