Skip to content

Commit

Permalink
use Symbol instead of __defaults magic string
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinMalfait committed Dec 14, 2021
1 parent 7217d78 commit 1ef73fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/lib/expandTailwindAtRules.js
Expand Up @@ -150,8 +150,7 @@ function buildStylesheet(rules, context) {
return returnValue
}

// export const DEFAULTS_LAYER = Symbol('defaults-layer')
export const DEFAULTS_LAYER = '__defaults'
export const DEFAULTS_LAYER = Symbol('defaults-layer')

export default function expandTailwindAtRules(context) {
return (root) => {
Expand Down
10 changes: 3 additions & 7 deletions tests/raw-content.test.js
Expand Up @@ -3,10 +3,7 @@ import path from 'path'

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

beforeEach(() => jest.resetModules())

test('raw content', () => {
let tailwind = require('../src')
it('raw content', () => {
let config = {
content: [{ raw: fs.readFileSync(path.resolve(__dirname, './raw-content.test.html'), 'utf8') }],
corePlugins: { preflight: false },
Expand All @@ -17,7 +14,7 @@ test('raw content', () => {
@tailwind utilities;
`

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

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

test('raw content with extension', () => {
let tailwind = require('../src')
let config = {
content: {
files: [
Expand All @@ -42,7 +38,7 @@ test('raw content with extension', () => {
corePlugins: { preflight: false },
}

return run('@tailwind utilities', config, tailwind).then((result) => {
return run('@tailwind utilities', config).then((result) => {
expect(result.css).toMatchFormattedCss(css`
.invisible {
visibility: hidden;
Expand Down

0 comments on commit 1ef73fc

Please sign in to comment.