Skip to content

Commit 1ef73fc

Browse files
committed
use Symbol instead of __defaults magic string
1 parent 7217d78 commit 1ef73fc

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/lib/expandTailwindAtRules.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ function buildStylesheet(rules, context) {
150150
return returnValue
151151
}
152152

153-
// export const DEFAULTS_LAYER = Symbol('defaults-layer')
154-
export const DEFAULTS_LAYER = '__defaults'
153+
export const DEFAULTS_LAYER = Symbol('defaults-layer')
155154

156155
export default function expandTailwindAtRules(context) {
157156
return (root) => {

tests/raw-content.test.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ import path from 'path'
33

44
import { run, css } from './util/run'
55

6-
beforeEach(() => jest.resetModules())
7-
8-
test('raw content', () => {
9-
let tailwind = require('../src')
6+
it('raw content', () => {
107
let config = {
118
content: [{ raw: fs.readFileSync(path.resolve(__dirname, './raw-content.test.html'), 'utf8') }],
129
corePlugins: { preflight: false },
@@ -17,7 +14,7 @@ test('raw content', () => {
1714
@tailwind utilities;
1815
`
1916

20-
return run(input, config, tailwind).then((result) => {
17+
return run(input, config).then((result) => {
2118
let expectedPath = path.resolve(__dirname, './raw-content.test.css')
2219
let expected = fs.readFileSync(expectedPath, 'utf8')
2320

@@ -26,7 +23,6 @@ test('raw content', () => {
2623
})
2724

2825
test('raw content with extension', () => {
29-
let tailwind = require('../src')
3026
let config = {
3127
content: {
3228
files: [
@@ -42,7 +38,7 @@ test('raw content with extension', () => {
4238
corePlugins: { preflight: false },
4339
}
4440

45-
return run('@tailwind utilities', config, tailwind).then((result) => {
41+
return run('@tailwind utilities', config).then((result) => {
4642
expect(result.css).toMatchFormattedCss(css`
4743
.invisible {
4844
visibility: hidden;

0 commit comments

Comments
 (0)