Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit e7e4544

Browse files
committed
Remove numbering from tests
1 parent 4b9663a commit e7e4544

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+45
-43
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
},
4141
"jest": {
4242
"setupFilesAfterEnv": [
43-
"<rootDir>/tests/customMatchers.js"
43+
"<rootDir>/tests/_customMatchers.js"
4444
]
4545
},
4646
"browserslist": [
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/10-apply.test.js renamed to tests/apply.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function run(input, config = {}) {
1414
test('@apply', () => {
1515
let config = {
1616
darkMode: 'class',
17-
purge: [path.resolve(__dirname, './10-apply.test.html')],
17+
purge: [path.resolve(__dirname, './apply.test.html')],
1818
corePlugins: { preflight: false },
1919
theme: {},
2020
plugins: [],
@@ -136,7 +136,7 @@ test('@apply', () => {
136136
`
137137

138138
return run(css, config).then((result) => {
139-
let expectedPath = path.resolve(__dirname, './10-apply.test.css')
139+
let expectedPath = path.resolve(__dirname, './apply.test.css')
140140
let expected = fs.readFileSync(expectedPath, 'utf8')
141141

142142
expect(result.css).toMatchCss(expected)
@@ -146,7 +146,7 @@ test('@apply', () => {
146146
test('@apply error with unknown utility', async () => {
147147
let config = {
148148
darkMode: 'class',
149-
purge: [path.resolve(__dirname, './10-apply.test.html')],
149+
purge: [path.resolve(__dirname, './apply.test.html')],
150150
corePlugins: { preflight: false },
151151
plugins: [],
152152
}
@@ -168,7 +168,7 @@ test('@apply error with unknown utility', async () => {
168168
test('@apply error with nested @screen', async () => {
169169
let config = {
170170
darkMode: 'class',
171-
purge: [path.resolve(__dirname, './10-apply.test.html')],
171+
purge: [path.resolve(__dirname, './apply.test.html')],
172172
corePlugins: { preflight: false },
173173
plugins: [],
174174
}
@@ -194,7 +194,7 @@ test('@apply error with nested @screen', async () => {
194194
test('@apply error with nested @anyatrulehere', async () => {
195195
let config = {
196196
darkMode: 'class',
197-
purge: [path.resolve(__dirname, './10-apply.test.html')],
197+
purge: [path.resolve(__dirname, './apply.test.html')],
198198
corePlugins: { preflight: false },
199199
plugins: [],
200200
}
File renamed without changes.

tests/08-arbitrary-values.test.js renamed to tests/arbitrary-values.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function run(input, config = {}) {
99

1010
test('arbitrary values', () => {
1111
let config = {
12-
purge: [path.resolve(__dirname, './08-arbitrary-values.test.html')],
12+
purge: [path.resolve(__dirname, './arbitrary-values.test.html')],
1313
corePlugins: { preflight: false },
1414
theme: {},
1515
plugins: [],
@@ -22,7 +22,7 @@ test('arbitrary values', () => {
2222
`
2323

2424
return run(css, config).then((result) => {
25-
let expectedPath = path.resolve(__dirname, './08-arbitrary-values.test.css')
25+
let expectedPath = path.resolve(__dirname, './arbitrary-values.test.css')
2626
let expected = fs.readFileSync(expectedPath, 'utf8')
2727

2828
expect(result.css).toMatchCss(expected)
File renamed without changes.
File renamed without changes.

tests/01-basic-usage.test.js renamed to tests/basic-usage.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function run(input, config = {}) {
99

1010
test('basic usage', () => {
1111
let config = {
12-
purge: [path.resolve(__dirname, './01-basic-usage.test.html')],
12+
purge: [path.resolve(__dirname, './basic-usage.test.html')],
1313
corePlugins: { preflight: false },
1414
theme: {},
1515
plugins: [],
@@ -22,7 +22,7 @@ test('basic usage', () => {
2222
`
2323

2424
return run(css, config).then((result) => {
25-
let expectedPath = path.resolve(__dirname, './01-basic-usage.test.css')
25+
let expectedPath = path.resolve(__dirname, './basic-usage.test.css')
2626
let expected = fs.readFileSync(expectedPath, 'utf8')
2727

2828
expect(result.css).toMatchCss(expected)

tests/09-collapse-adjacent-rules.test.js renamed to tests/collapse-adjacent-rules.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function run(input, config = {}) {
99

1010
test('collapse adjacent rules', () => {
1111
let config = {
12-
purge: [path.resolve(__dirname, './09-collapse-adjacent-rules.test.html')],
12+
purge: [path.resolve(__dirname, './collapse-adjacent-rules.test.html')],
1313
corePlugins: { preflight: false },
1414
theme: {},
1515
plugins: [],
@@ -47,7 +47,7 @@ test('collapse adjacent rules', () => {
4747
`
4848

4949
return run(css, config).then((result) => {
50-
let expectedPath = path.resolve(__dirname, './09-collapse-adjacent-rules.test.css')
50+
let expectedPath = path.resolve(__dirname, './collapse-adjacent-rules.test.css')
5151
let expected = fs.readFileSync(expectedPath, 'utf8')
5252

5353
expect(result.css).toMatchCss(expected)

tests/13-custom-extractors.test.js renamed to tests/custom-extractors.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ const css = `
1818
@tailwind components;
1919
@tailwind utilities;
2020
`
21-
const expectedPath = path.resolve(__dirname, './13-custom-extractors.test.css')
21+
const expectedPath = path.resolve(__dirname, './custom-extractors.test.css')
2222
const expected = fs.readFileSync(expectedPath, 'utf8')
2323

2424
test('defaultExtractor', () => {
2525
let config = {
2626
purge: {
27-
content: [path.resolve(__dirname, './13-custom-extractors.test.html')],
27+
content: [path.resolve(__dirname, './custom-extractors.test.html')],
2828
options: {
2929
defaultExtractor: customExtractor,
3030
},
@@ -42,7 +42,7 @@ test('defaultExtractor', () => {
4242
test('extractors array', () => {
4343
let config = {
4444
purge: {
45-
content: [path.resolve(__dirname, './13-custom-extractors.test.html')],
45+
content: [path.resolve(__dirname, './custom-extractors.test.html')],
4646
options: {
4747
extractors: [
4848
{
File renamed without changes.

tests/03-custom-separator.test.js renamed to tests/custom-separator.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function run(input, config = {}) {
1010
test('custom separator', () => {
1111
let config = {
1212
darkMode: 'class',
13-
purge: [path.resolve(__dirname, './03-custom-separator.test.html')],
13+
purge: [path.resolve(__dirname, './custom-separator.test.html')],
1414
separator: '_',
1515
corePlugins: {},
1616
theme: {},
@@ -20,7 +20,7 @@ test('custom separator', () => {
2020
let css = `@tailwind utilities`
2121

2222
return run(css, config).then((result) => {
23-
let expectedPath = path.resolve(__dirname, './03-custom-separator.test.css')
23+
let expectedPath = path.resolve(__dirname, './custom-separator.test.css')
2424
let expected = fs.readFileSync(expectedPath, 'utf8')
2525

2626
expect(result.css).toMatchCss(expected)
File renamed without changes.
File renamed without changes.

tests/12-import-syntax.test.js renamed to tests/import-syntax.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function run(input, config = {}) {
99

1010
test('using @import instead of @tailwind', () => {
1111
let config = {
12-
purge: [path.resolve(__dirname, './12-import-syntax.test.html')],
12+
purge: [path.resolve(__dirname, './import-syntax.test.html')],
1313
corePlugins: { preflight: false },
1414
theme: {},
1515
plugins: [
@@ -30,7 +30,7 @@ test('using @import instead of @tailwind', () => {
3030
`
3131

3232
return run(css, config).then((result) => {
33-
let expectedPath = path.resolve(__dirname, './12-import-syntax.test.css')
33+
let expectedPath = path.resolve(__dirname, './import-syntax.test.css')
3434
let expected = fs.readFileSync(expectedPath, 'utf8')
3535

3636
expect(result.css).toMatchCss(expected)

tests/04-important-boolean.test.js renamed to tests/important-boolean.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test('important boolean', () => {
1111
let config = {
1212
important: true,
1313
darkMode: 'class',
14-
purge: [path.resolve(__dirname, './04-important-boolean.test.html')],
14+
purge: [path.resolve(__dirname, './important-boolean.test.html')],
1515
corePlugins: { preflight: false },
1616
theme: {},
1717
plugins: [
@@ -62,7 +62,7 @@ test('important boolean', () => {
6262
`
6363

6464
return run(css, config).then((result) => {
65-
let expectedPath = path.resolve(__dirname, './04-important-boolean.test.css')
65+
let expectedPath = path.resolve(__dirname, './important-boolean.test.css')
6666
let expected = fs.readFileSync(expectedPath, 'utf8')
6767

6868
expect(result.css).toMatchCss(expected)

tests/15-important-modifier-prefix.test.js renamed to tests/important-modifier-prefix.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ test('important modifier with prefix', () => {
1212
important: false,
1313
prefix: 'tw-',
1414
darkMode: 'class',
15-
purge: [path.resolve(__dirname, './15-important-modifier-prefix.test.html')],
15+
purge: [path.resolve(__dirname, './important-modifier-prefix.test.html')],
1616
corePlugins: { preflight: false },
1717
theme: {},
1818
plugins: [],
@@ -25,7 +25,7 @@ test('important modifier with prefix', () => {
2525
`
2626

2727
return run(css, config).then((result) => {
28-
let expectedPath = path.resolve(__dirname, './15-important-modifier-prefix.test.css')
28+
let expectedPath = path.resolve(__dirname, './important-modifier-prefix.test.css')
2929
let expected = fs.readFileSync(expectedPath, 'utf8')
3030

3131
expect(result.css).toMatchCss(expected)

tests/14-important-modifier.test.js renamed to tests/important-modifier.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test('important modifier', () => {
1111
let config = {
1212
important: false,
1313
darkMode: 'class',
14-
purge: [path.resolve(__dirname, './14-important-modifier.test.html')],
14+
purge: [path.resolve(__dirname, './important-modifier.test.html')],
1515
corePlugins: { preflight: false },
1616
theme: {},
1717
plugins: [],
@@ -24,7 +24,7 @@ test('important modifier', () => {
2424
`
2525

2626
return run(css, config).then((result) => {
27-
let expectedPath = path.resolve(__dirname, './14-important-modifier.test.css')
27+
let expectedPath = path.resolve(__dirname, './important-modifier.test.css')
2828
let expected = fs.readFileSync(expectedPath, 'utf8')
2929

3030
expect(result.css).toMatchCss(expected)
File renamed without changes.
File renamed without changes.

tests/00-kitchen-sink.test.js renamed to tests/kitchen-sink.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function run(input, config = {}) {
1010
test('it works', () => {
1111
let config = {
1212
darkMode: 'class',
13-
purge: [path.resolve(__dirname, './00-kitchen-sink.test.html')],
13+
purge: [path.resolve(__dirname, './kitchen-sink.test.html')],
1414
corePlugins: { preflight: false },
1515
theme: {
1616
extend: {
@@ -158,7 +158,7 @@ test('it works', () => {
158158
`
159159

160160
return run(css, config).then((result) => {
161-
let expectedPath = path.resolve(__dirname, './00-kitchen-sink.test.css')
161+
let expectedPath = path.resolve(__dirname, './kitchen-sink.test.css')
162162
let expected = fs.readFileSync(expectedPath, 'utf8')
163163

164164
expect(result.css).toMatchCss(expected)
File renamed without changes.

tests/06-modify-selectors.test.js renamed to tests/modify-selectors.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function run(input, config = {}) {
1111
test('modify selectors', () => {
1212
let config = {
1313
darkMode: 'class',
14-
purge: [path.resolve(__dirname, './06-modify-selectors.test.html')],
14+
purge: [path.resolve(__dirname, './modify-selectors.test.html')],
1515
corePlugins: { preflight: false },
1616
theme: {},
1717
plugins: [
@@ -42,7 +42,7 @@ test('modify selectors', () => {
4242
`
4343

4444
return run(css, config).then((result) => {
45-
let expectedPath = path.resolve(__dirname, './06-modify-selectors.test.css')
45+
let expectedPath = path.resolve(__dirname, './modify-selectors.test.css')
4646
let expected = fs.readFileSync(expectedPath, 'utf8')
4747

4848
expect(result.css).toMatchCss(expected)
File renamed without changes.
File renamed without changes.

tests/11-mutable.test.js renamed to tests/mutable.test.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ const path = require('path')
66
function pluginThatMutatesRules() {
77
return (root) => {
88
root.walkRules((rule) => {
9-
rule.nodes.filter(node => node.prop === 'background-image').forEach(node => {
10-
node.value = 'url("./bar.png")'
11-
})
9+
rule.nodes
10+
.filter((node) => node.prop === 'background-image')
11+
.forEach((node) => {
12+
node.value = 'url("./bar.png")'
13+
})
1214

1315
return rule
1416
})
@@ -21,19 +23,19 @@ function run(input, config = {}) {
2123

2224
test.only('plugins mutating rules after tailwind doesnt break it', async () => {
2325
let config = {
24-
purge: [path.resolve(__dirname, './11-mutable.test.html')],
26+
purge: [path.resolve(__dirname, './mutable.test.html')],
2527
theme: {
2628
backgroundImage: {
27-
'foo': 'url("./foo.png")',
28-
}
29+
foo: 'url("./foo.png")',
30+
},
2931
},
3032
plugins: [],
3133
}
3234

3335
let css = `@tailwind utilities;`
3436

3537
function checkResult(result) {
36-
let expectedPath = path.resolve(__dirname, './11-mutable.test.css')
38+
let expectedPath = path.resolve(__dirname, './mutable.test.css')
3739
let expected = fs.readFileSync(expectedPath, 'utf8')
3840

3941
expect(result.css).toMatchCss(expected)
@@ -45,7 +47,7 @@ test.only('plugins mutating rules after tailwind doesnt break it', async () => {
4547

4648
// Outside of the context of tailwind jit more postcss plugins may operate on the AST:
4749
// In this case we have a plugin that mutates rules directly
48-
await postcss([ pluginThatMutatesRules() ]).process(firstRun, { from: path.resolve(__filename) })
50+
await postcss([pluginThatMutatesRules()]).process(firstRun, { from: path.resolve(__filename) })
4951

5052
// Verify subsequent runs don't produce mutated rules
5153
let secondRun = await run(css, config)
File renamed without changes.
File renamed without changes.

tests/05-prefix.test.js renamed to tests/prefix.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test('prefix', () => {
1111
let config = {
1212
prefix: 'tw-',
1313
darkMode: 'class',
14-
purge: [path.resolve(__dirname, './05-prefix.test.html')],
14+
purge: [path.resolve(__dirname, './prefix.test.html')],
1515
corePlugins: { preflight: false },
1616
theme: {},
1717
plugins: [
@@ -63,7 +63,7 @@ test('prefix', () => {
6363
`
6464

6565
return run(css, config).then((result) => {
66-
let expectedPath = path.resolve(__dirname, './05-prefix.test.css')
66+
let expectedPath = path.resolve(__dirname, './prefix.test.css')
6767
let expected = fs.readFileSync(expectedPath, 'utf8')
6868

6969
expect(result.css).toMatchCss(expected)

tests/07-responsive-and-variants-atrules.test.js renamed to tests/responsive-and-variants-atrules.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function run(input, config = {}) {
99

1010
test('responsive and variants atrules', () => {
1111
let config = {
12-
purge: [path.resolve(__dirname, './07-responsive-and-variants-atrules.test.html')],
12+
purge: [path.resolve(__dirname, './responsive-and-variants-atrules.test.html')],
1313
corePlugins: { preflight: false },
1414
theme: {},
1515
plugins: [],
@@ -80,7 +80,7 @@ test('responsive and variants atrules', () => {
8080
`
8181

8282
return run(css, config).then((result) => {
83-
let expectedPath = path.resolve(__dirname, './07-responsive-and-variants-atrules.test.css')
83+
let expectedPath = path.resolve(__dirname, './responsive-and-variants-atrules.test.css')
8484
let expected = fs.readFileSync(expectedPath, 'utf8')
8585

8686
expect(result.css).toMatchCss(expected)
File renamed without changes.
File renamed without changes.

tests/02-variants.test.js renamed to tests/variants.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function run(input, config = {}) {
1010
test('variants', () => {
1111
let config = {
1212
darkMode: 'class',
13-
purge: [path.resolve(__dirname, './02-variants.test.html')],
13+
purge: [path.resolve(__dirname, './variants.test.html')],
1414
corePlugins: { preflight: false },
1515
theme: {},
1616
plugins: [],
@@ -23,7 +23,7 @@ test('variants', () => {
2323
`
2424

2525
return run(css, config).then((result) => {
26-
let expectedPath = path.resolve(__dirname, './02-variants.test.css')
26+
let expectedPath = path.resolve(__dirname, './variants.test.css')
2727
let expected = fs.readFileSync(expectedPath, 'utf8')
2828

2929
expect(result.css).toMatchCss(expected)

0 commit comments

Comments
 (0)