* move `preflight` tests to `plugins` test folder * move `container` tests to `plugins` test folder * add a test that ensures that all built-in plugins have tests This is based on a few assumptions: 1. All plugins exist in the `corePlugins.js` file and are exported as `corePlugins` 2. Each exported plugin in that object has a file with a corresponding name in the current (`tests/plugins/`) folder * add dedicated plugin tests in the `plugins` folder * add a test that ensures that all built-in variant plugins have tests This is based on a few assumptions: 1. All variant plugins exist in the `corePlugins.js` file and are exported as `variantPlugins` 2. Each exported plugin in that object has a file with a corresponding name in the current (`tests/plugins/variants/`) folder * add dedicated variant plugin tests in the `plugins/variants` folder * cleanup basic usage test * move existing animation tests to animation plugin tests * move `apply-important-selector` tests to more appropriate location
61 lines
1.1 KiB
JavaScript
61 lines
1.1 KiB
JavaScript
import { css, quickPluginTest } from '../util/run'
|
|
|
|
quickPluginTest('textOpacity', {
|
|
safelist: [
|
|
// Arbitrary values
|
|
'text-opacity-[12%]',
|
|
'text-opacity-[var(--my-value)]',
|
|
],
|
|
}).toMatchFormattedCss(css`
|
|
.text-opacity-0 {
|
|
--tw-text-opacity: 0;
|
|
}
|
|
.text-opacity-10 {
|
|
--tw-text-opacity: 0.1;
|
|
}
|
|
.text-opacity-100 {
|
|
--tw-text-opacity: 1;
|
|
}
|
|
.text-opacity-20 {
|
|
--tw-text-opacity: 0.2;
|
|
}
|
|
.text-opacity-25 {
|
|
--tw-text-opacity: 0.25;
|
|
}
|
|
.text-opacity-30 {
|
|
--tw-text-opacity: 0.3;
|
|
}
|
|
.text-opacity-40 {
|
|
--tw-text-opacity: 0.4;
|
|
}
|
|
.text-opacity-5 {
|
|
--tw-text-opacity: 0.05;
|
|
}
|
|
.text-opacity-50 {
|
|
--tw-text-opacity: 0.5;
|
|
}
|
|
.text-opacity-60 {
|
|
--tw-text-opacity: 0.6;
|
|
}
|
|
.text-opacity-70 {
|
|
--tw-text-opacity: 0.7;
|
|
}
|
|
.text-opacity-75 {
|
|
--tw-text-opacity: 0.75;
|
|
}
|
|
.text-opacity-80 {
|
|
--tw-text-opacity: 0.8;
|
|
}
|
|
.text-opacity-90 {
|
|
--tw-text-opacity: 0.9;
|
|
}
|
|
.text-opacity-95 {
|
|
--tw-text-opacity: 0.95;
|
|
}
|
|
.text-opacity-\[12\%\] {
|
|
--tw-text-opacity: 12%;
|
|
}
|
|
.text-opacity-\[var\(--my-value\)\] {
|
|
--tw-text-opacity: var(--my-value);
|
|
}
|
|
`)
|