import postcss from 'postcss' import fs from 'fs' import path from 'path' import tailwind from '../../src' function run(input, config = {}) { return postcss(tailwind(config)).process(input, { from: path.resolve(__filename) }) } test('opacity', () => { let config = { darkMode: 'class', content: [path.resolve(__dirname, './opacity.test.html')], corePlugins: { backgroundOpacity: false, borderOpacity: false, divideOpacity: false, placeholderOpacity: false, textOpacity: false, }, theme: {}, plugins: [], } let css = ` @tailwind utilities; ` return run(css, config).then((result) => { let expectedPath = path.resolve(__dirname, './opacity.test.css') let expected = fs.readFileSync(expectedPath, 'utf8') expect(result.css).toMatchCss(expected) }) })