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', () => {
|
test('it generates the correct classes with no variants', () => {
|
||||||
generatePluginCss().then(result => {
|
const output = `
|
||||||
expect(result.css).toMatchCss(`
|
|
||||||
.test {
|
.test {
|
||||||
display: block
|
display: block
|
||||||
}
|
}
|
||||||
`)
|
`
|
||||||
|
|
||||||
|
generatePluginCss().then(result => {
|
||||||
|
expect(result.css).toMatchCss(output)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
test('it generates the correct classes with variants', () => {
|
test('it generates the correct classes with variants', () => {
|
||||||
generatePluginCss({ variants: ['hover', 'focus'] }).then(result => {
|
const output = `
|
||||||
expect(result.css).toMatchCss(`
|
|
||||||
.test {
|
.test {
|
||||||
display: block
|
display: block
|
||||||
}
|
}
|
||||||
|
@ -44,6 +45,9 @@ test('it generates the correct classes with variants', () => {
|
||||||
.focus\\:test:focus {
|
.focus\\:test:focus {
|
||||||
display: block
|
display: block
|
||||||
}
|
}
|
||||||
`)
|
`
|
||||||
|
|
||||||
|
generatePluginCss({ variants: ['hover', 'focus'] }).then(result => {
|
||||||
|
expect(result.css).toMatchCss(output)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue