-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
38 lines (34 loc) · 823 Bytes
/
Copy pathtest.js
File metadata and controls
38 lines (34 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { merge } from 'lodash';
import { cssMatcher } from 'jest-matcher-css';
import postcss from 'postcss';
import tailwindcss from 'tailwindcss';
import pwaPlugin from './index';
expect.extend({
toMatchCss: cssMatcher,
});
function generatePluginCss(overrides) {
const config = {
theme: {
// Default options for your plugin.
displaymodes: {
YOUR_PLUGIN_CUSTOM_OPTION: false,
},
},
variants: {
// Default variants for your plugin.
displaymodes: [],
},
corePlugins: false,
plugins: [pwaPlugin],
};
return postcss(tailwindcss(merge(config, overrides)))
.process('@tailwind utilities', {
from: undefined,
})
.then(({ css }) => css);
}
test('should', () => {
const css = generatePluginCss();
console.log(css);
return true;
});