-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure
corePlugins
order is consistent (#5928)
* ensure corePlugins order is consistent * update order in tests
- Loading branch information
1 parent
e08003d
commit 468c9c5
Showing
4 changed files
with
56 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import postcss from 'postcss' | ||
import tailwind from '../src/index' | ||
|
||
function run(input, config = {}) { | ||
return postcss([tailwind(config)]).process(input, { from: undefined }) | ||
} | ||
|
||
it('should not change the order of the plugins based on corePlugins in config', async () => { | ||
let config1 = { | ||
purge: { | ||
enabled: true, | ||
content: [{ raw: `<div class="transform translate-x-full"></div>` }], | ||
}, | ||
corePlugins: ['translate', 'transform'], | ||
} | ||
let config2 = { | ||
purge: { | ||
enabled: true, | ||
content: [{ raw: `<div class="transform translate-x-full"></div>` }], | ||
}, | ||
corePlugins: ['transform', 'translate'], | ||
} | ||
|
||
let input = ` | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
` | ||
|
||
let [first, second] = await Promise.all([run(input, config1), run(input, config2)]) | ||
expect(first.css).toMatchFormattedCss(second.css) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters