Skip to content

Commit 12857dd

Browse files
committed
Test no prefix apply with function prefix
1 parent 77a2aed commit 12857dd

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

__tests__/applyAtRule.test.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -217,28 +217,28 @@ test('you can apply utility classes without using the given prefix', () => {
217217
})
218218
})
219219

220-
// test('you can apply utility classes without using the given prefix when using a function for the prefix', () => {
221-
// const input = `
222-
// .foo { @apply .tw-mt-4 .mb-4; }
223-
// `
224-
225-
// const expected = `
226-
// .foo { margin-top: 1rem; margin-bottom: 1rem; }
227-
// `
228-
229-
// const config = {
230-
// ...defaultConfig,
231-
// options: {
232-
// ...defaultConfig.options,
233-
// prefix: selector => {
234-
// return 'tw-'
235-
// },
236-
// },
237-
// experiments: { shadowLookup: true },
238-
// }
239-
240-
// return run(input, config, generateUtilities(config, [])).then(result => {
241-
// expect(result.css).toEqual(expected)
242-
// expect(result.warnings().length).toBe(0)
243-
// })
244-
// })
220+
test('you can apply utility classes without using the given prefix when using a function for the prefix', () => {
221+
const input = `
222+
.foo { @apply .tw-mt-4 .mb-4; }
223+
`
224+
225+
const expected = `
226+
.foo { margin-top: 1rem; margin-bottom: 1rem; }
227+
`
228+
229+
const config = {
230+
...defaultConfig,
231+
options: {
232+
...defaultConfig.options,
233+
prefix: () => {
234+
return 'tw-'
235+
},
236+
},
237+
experiments: { shadowLookup: true },
238+
}
239+
240+
return run(input, config, generateUtilities(config, [])).then(result => {
241+
expect(result.css).toEqual(expected)
242+
expect(result.warnings().length).toBe(0)
243+
})
244+
})

0 commit comments

Comments
 (0)