mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Instead of plugins being configured directly, they grab their configuration from the Tailwind config passed to them. This makes core plugins consistent with how we will recommend third-party plugins be authored so that the configuration for everything in the system is readable through the theme.
19 lines
426 B
JavaScript
19 lines
426 B
JavaScript
import configurePlugins from '../src/util/configurePlugins'
|
|
|
|
test('setting a plugin to false removes it', () => {
|
|
const plugins = {
|
|
fontSize: () => 'fontSize',
|
|
display: () => 'display',
|
|
backgroundPosition: () => 'backgroundPosition',
|
|
}
|
|
|
|
const configuredPlugins = configurePlugins(
|
|
{
|
|
display: false,
|
|
},
|
|
plugins
|
|
)
|
|
|
|
expect(configuredPlugins).toEqual(['fontSize', 'backgroundPosition'])
|
|
})
|