Rename generatePluginCss to run

This commit is contained in:
Oliver Davies 2019-05-02 01:51:43 +01:00
parent 98021467bf
commit 81e2052ca2

View file

@ -4,7 +4,7 @@ const plugin = require('./index')
const postcss = require('postcss') const postcss = require('postcss')
const tailwindcss = require('tailwindcss') const tailwindcss = require('tailwindcss')
function generatePluginCss(options = {}) { function run(options = {}) {
return postcss( return postcss(
tailwindcss({ tailwindcss({
corePlugins: false, corePlugins: false,
@ -27,7 +27,7 @@ test('it generates the correct classes with no variants', () => {
} }
` `
generatePluginCss().then(result => { run().then(result => {
expect(result.css).toMatchCss(output) expect(result.css).toMatchCss(output)
}) })
}) })
@ -47,7 +47,7 @@ test('it generates the correct classes with variants', () => {
} }
` `
generatePluginCss({ variants: ['hover', 'focus'] }).then(result => { run({ variants: ['hover', 'focus'] }).then(result => {
expect(result.css).toMatchCss(output) expect(result.css).toMatchCss(output)
}) })
}) })