* sync package-lock.json
* reduce generated examples
By default we use the default config when creating the quick tests for a
given plugin. However, this can result in _a lot_ of changes. For
example, when you update the opacity values, then these values will be
generated for each color, and for each plugin that uses that color.
You can see that behaviour in Adam's PR (https://github.com/tailwindlabs/tailwindcss/pull/11832).
He added 6 values to the opacity configuration. This resulted in a diff
that looked like this:
```
+219,436 −9
```
This reduces the amount of examples for plugins that generate _a lot_ of
output otherwise.
* use `toMatchSnapshot`
This way all the `quickPluginTest` and `quickVariantPluginTest`
implementations are the same. This also allows us to update tests after
config changes in an easier way because they use snapshot tests right
now.
* use real colors for reduced red
This will make it a tiny bit easier to debug what's going on if we need
it in the future since it's using the same values as the real colors.
* 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
* implement matchUtilities2
* ensure animation names without keyframes are not prefixed
* remove matchBase
* call addUtilities for each group individually
* WIP: Write plugins using matchUtilities2
* MORE
* Fix arbitrary value support for fontSize
* Fixes, update fixtures
* Rebuild fixtures
* Don't generate `divide` class with no modifier
* Fixes, rebuild fixtures
* Rename matchUtilities2 to matchUtilities
* Delete bad tests
* Remove temp files GROSS
* Clean stuff up
* Support no return in matchUtilities
Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
* 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>
2021-04-30 10:58:40 -04:00
Renamed from __tests__/plugins/stroke.test.js (Browse further)