Extract output constants
This commit is contained in:
parent
388eb307ca
commit
98021467bf
16
test.js
16
test.js
|
@ -21,18 +21,19 @@ expect.extend({
|
|||
})
|
||||
|
||||
test('it generates the correct classes with no variants', () => {
|
||||
generatePluginCss().then(result => {
|
||||
expect(result.css).toMatchCss(`
|
||||
const output = `
|
||||
.test {
|
||||
display: block
|
||||
}
|
||||
`)
|
||||
`
|
||||
|
||||
generatePluginCss().then(result => {
|
||||
expect(result.css).toMatchCss(output)
|
||||
})
|
||||
})
|
||||
|
||||
test('it generates the correct classes with variants', () => {
|
||||
generatePluginCss({ variants: ['hover', 'focus'] }).then(result => {
|
||||
expect(result.css).toMatchCss(`
|
||||
const output = `
|
||||
.test {
|
||||
display: block
|
||||
}
|
||||
|
@ -44,6 +45,9 @@ test('it generates the correct classes with variants', () => {
|
|||
.focus\\:test:focus {
|
||||
display: block
|
||||
}
|
||||
`)
|
||||
`
|
||||
|
||||
generatePluginCss({ variants: ['hover', 'focus'] }).then(result => {
|
||||
expect(result.css).toMatchCss(output)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue