mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
* move `./tests/jit` to `./tests` * make tests consistent Abstracted a `run` function and some syntax highlighting helpers for `html`, `css` and `javascript`.
26 lines
793 B
JavaScript
26 lines
793 B
JavaScript
import configurePlugins from '../src/util/configurePlugins'
|
|
|
|
test('setting a plugin to false removes it', () => {
|
|
const plugins = ['fontSize', 'display', 'backgroundPosition']
|
|
|
|
const configuredPlugins = configurePlugins({ display: false }, plugins)
|
|
|
|
expect(configuredPlugins).toEqual(['fontSize', 'backgroundPosition'])
|
|
})
|
|
|
|
test('passing only false removes all plugins', () => {
|
|
const plugins = ['fontSize', 'display', 'backgroundPosition']
|
|
|
|
const configuredPlugins = configurePlugins(false, plugins)
|
|
|
|
expect(configuredPlugins).toEqual([])
|
|
})
|
|
|
|
test('passing an array whitelists plugins', () => {
|
|
const plugins = ['fontSize', 'display', 'backgroundPosition']
|
|
|
|
const configuredPlugins = configurePlugins(['display'], plugins)
|
|
|
|
expect(configuredPlugins).toEqual(['display'])
|
|
})
|