Skip to content

Commit 4c9c0e1

Browse files
committed
add a test for: #23
1 parent ada2132 commit 4c9c0e1

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

__tests__/issues.test.html

Whitespace-only changes.

__tests__/issues.test.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
const tailwindcssVariables = require('../src/index')
2+
const utils = require('./util/_utils')(__filename)
3+
4+
test('issue 23', async () => {
5+
expect(
6+
await utils.diffOnly({
7+
content: [utils.content()],
8+
darkMode: false,
9+
theme: {
10+
variables: {
11+
DEFAULT: {
12+
// body
13+
'body-color': '#000',
14+
'body-bg': '#fff',
15+
'body-font-family': 'var(--font-primary)',
16+
'body-font-size': '1rem',
17+
'body-font-weight': '400',
18+
'body-line-height': '1.5',
19+
},
20+
},
21+
},
22+
23+
plugins: [tailwindcssVariables],
24+
})
25+
).toMatchInlineSnapshot(`
26+
"
27+
28+
29+
+ :root {
30+
+ --body-color: #000;
31+
+ --body-bg: #fff;
32+
+ --body-font-family: var(--font-primary);
33+
+ --body-font-size: 1rem;
34+
+ --body-font-weight: 400;
35+
+ --body-line-height: 1.5
36+
+ }
37+
38+
"
39+
`)
40+
})

0 commit comments

Comments
 (0)