mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
* WIP * WIP * Finish combining JIT and AOT plugins Still lots of clean up that can be done in some of the more complex ones, but at least it's one file per plugin now. * Remove unused import * Fix AOT generation bugs * Move corePlugins/index.js to corePlugins.js * Convert JIT files to ESM * Move tests * Reorder core plugins to match JIT order * Update AOT apply tests * Unify utils * Combine plugin lists to one single source of truth * Finish resolving merge conflicts, fix tests Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
31 lines
816 B
JavaScript
31 lines
816 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'])
|
|
})
|