mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Add test for optional prefix
This commit is contained in:
parent
f629b647da
commit
f8dfd04600
@ -192,3 +192,26 @@ test('you can apply utility classes that do not actually exist as long as they w
|
||||
expect(result.warnings().length).toBe(0)
|
||||
})
|
||||
})
|
||||
|
||||
test('you can apply utility classes without using the given prefix', () => {
|
||||
const input = `
|
||||
.foo { @apply .mt-4; }
|
||||
`
|
||||
|
||||
const expected = `
|
||||
.prefix-foo { margin-top: 1rem; }
|
||||
`
|
||||
|
||||
const config = {
|
||||
...defaultConfig,
|
||||
options: {
|
||||
...defaultConfig.options,
|
||||
prefix: 'prefix',
|
||||
},
|
||||
}
|
||||
|
||||
return run(input, config).then(result => {
|
||||
expect(result.css).toEqual(expected)
|
||||
expect(result.warnings().length).toBe(0)
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user