Skip to content

Commit 779de4d

Browse files
style: use it instead test
1 parent 6ee472d commit 779de4d

7 files changed

+31
-31
lines changed

test/SyntaxError.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import webpack from './helpers/compiler';
22
import { normalizeErrors } from './helpers/utils';
33

44
describe('SyntaxError', () => {
5-
test('basic', async () => {
5+
it('basic', async () => {
66
const stats = await webpack('broken.css');
77

88
expect(normalizeErrors(stats.compilation.warnings)).toMatchSnapshot(

test/Warning.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import webpack from './helpers/compiler';
22
import { normalizeErrors } from './helpers/utils';
33

44
describe('Warning', () => {
5-
test('basic', async () => {
5+
it('basic', async () => {
66
const stats = await webpack('warning.css');
77

88
expect(normalizeErrors(stats.compilation.warnings)).toMatchSnapshot(

test/import-option.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import evaluated from './helpers/evaluated';
44
import { normalizeErrors } from './helpers/utils';
55

66
describe('import', () => {
7-
test('true', async () => {
7+
it('true', async () => {
88
const config = {
99
loader: {
1010
options: {
@@ -26,7 +26,7 @@ describe('import', () => {
2626
expect(normalizeErrors(stats.compilation.errors)).toMatchSnapshot('errors');
2727
});
2828

29-
test('false', async () => {
29+
it('false', async () => {
3030
const config = {
3131
loader: {
3232
options: {

test/loader.test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import evaluated from './helpers/evaluated';
99
import { normalizeErrors } from './helpers/utils';
1010

1111
describe('loader', () => {
12-
test('basic', async () => {
12+
it('basic', async () => {
1313
const stats = await webpack('basic.js');
1414
const { modules } = stats.toJson();
1515
const [, runtime, escape, module] = modules;
@@ -24,7 +24,7 @@ describe('loader', () => {
2424
expect(stats.compilation.errors).toMatchSnapshot('errors');
2525
});
2626

27-
test('basic (css endpoint)', async () => {
27+
it('basic (css endpoint)', async () => {
2828
const stats = await webpack('basic.css');
2929
const { modules } = stats.toJson();
3030
const [, runtime, escape, module] = modules;
@@ -39,7 +39,7 @@ describe('loader', () => {
3939
expect(stats.compilation.errors).toMatchSnapshot('errors');
4040
});
4141

42-
test('empty options', async () => {
42+
it('empty options', async () => {
4343
const stats = await webpack('empty.css');
4444
const { modules } = stats.toJson();
4545
const [, module] = modules;
@@ -52,7 +52,7 @@ describe('loader', () => {
5252
expect(stats.compilation.errors).toMatchSnapshot('errors');
5353
});
5454

55-
test('error when no loader for url assets', async () => {
55+
it('error when no loader for url assets', async () => {
5656
const config = {
5757
rules: [
5858
{
@@ -69,7 +69,7 @@ describe('loader', () => {
6969
expect(stats.compilation.errors).toMatchSnapshot('errors');
7070
});
7171

72-
test('using together with "postcss-loader" (reuse ast)', async () => {
72+
it('using together with "postcss-loader" (reuse ast)', async () => {
7373
const config = {
7474
rules: [
7575
{
@@ -107,7 +107,7 @@ describe('loader', () => {
107107
expect(stats.compilation.errors).toMatchSnapshot('errors');
108108
});
109109

110-
test('using together with "sass-loader"', async () => {
110+
it('using together with "sass-loader"', async () => {
111111
const config = {
112112
rules: [
113113
{
@@ -142,7 +142,7 @@ describe('loader', () => {
142142
expect(stats.compilation.errors).toMatchSnapshot('errors');
143143
});
144144

145-
test('message api', async () => {
145+
it('message api', async () => {
146146
const postcssMessageApiPlugin = postcss.plugin(
147147
'postcss-message-api',
148148
() => (root, result) => {

test/source-map-option.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('sourceMap', () => {
3030
};
3131

3232
describe('true', () => {
33-
test('basic', async () => {
33+
it('basic', async () => {
3434
const config = {
3535
loader: {
3636
options: {
@@ -49,7 +49,7 @@ describe('sourceMap', () => {
4949
expect(stats.compilation.errors).toMatchSnapshot('errors');
5050
});
5151

52-
test('map from other loader', async () => {
52+
it('map from other loader', async () => {
5353
const config = generateRulesWithSourceMap(true, {
5454
file: 'test.css',
5555
mappings: 'AAAA,SAAS,SAAS,EAAE',
@@ -70,7 +70,7 @@ describe('sourceMap', () => {
7070
expect(stats.compilation.errors).toMatchSnapshot('errors');
7171
});
7272

73-
test('map is string', async () => {
73+
it('map is string', async () => {
7474
const config = generateRulesWithSourceMap(
7575
true,
7676
JSON.stringify({
@@ -96,7 +96,7 @@ describe('sourceMap', () => {
9696
});
9797

9898
describe('false', () => {
99-
test('basic', async () => {
99+
it('basic', async () => {
100100
const config = {
101101
loader: {
102102
options: {
@@ -115,7 +115,7 @@ describe('sourceMap', () => {
115115
expect(stats.compilation.errors).toMatchSnapshot('errors');
116116
});
117117

118-
test('map from other loader', async () => {
118+
it('map from other loader', async () => {
119119
const config = generateRulesWithSourceMap(false, {
120120
file: 'test.css',
121121
mappings: 'AAAA,SAAS,SAAS,EAAE',

test/url-option.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import webpack from './helpers/compiler';
22
import evaluated from './helpers/evaluated';
33

44
describe('url', () => {
5-
test('true', async () => {
5+
it('true', async () => {
66
const stats = await webpack('url/url.css');
77
const { modules } = stats.toJson();
88
const [, , , , , , , , , , , , , , , , module] = modules;
@@ -15,7 +15,7 @@ describe('url', () => {
1515
expect(stats.compilation.errors).toMatchSnapshot('errors');
1616
});
1717

18-
test('false', async () => {
18+
it('false', async () => {
1919
const config = {
2020
loader: {
2121
options: {

test/validation-errors.test.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import webpack from './helpers/compiler';
33
import { normalizeErrors } from './helpers/utils';
44

55
describe('Validation Errors', () => {
6-
test('unknown option', async () => {
6+
it('unknown option', async () => {
77
const config = {
88
loader: {
99
options: {
@@ -19,7 +19,7 @@ describe('Validation Errors', () => {
1919
expect(normalizeErrors(stats.compilation.errors)).toMatchSnapshot('errors');
2020
});
2121

22-
test('url - true (boolean)', async () => {
22+
it('url - true (boolean)', async () => {
2323
const config = {
2424
loader: {
2525
options: {
@@ -33,7 +33,7 @@ describe('Validation Errors', () => {
3333
expect(stats.compilation.errors).toMatchSnapshot('errors');
3434
});
3535

36-
test('url - false (boolean)', async () => {
36+
it('url - false (boolean)', async () => {
3737
const config = {
3838
loader: {
3939
options: {
@@ -47,7 +47,7 @@ describe('Validation Errors', () => {
4747
expect(stats.compilation.errors).toMatchSnapshot('errors');
4848
});
4949

50-
test('url - true (string)', async () => {
50+
it('url - true (string)', async () => {
5151
const config = {
5252
loader: {
5353
options: {
@@ -63,7 +63,7 @@ describe('Validation Errors', () => {
6363
expect(normalizeErrors(stats.compilation.errors)).toMatchSnapshot('errors');
6464
});
6565

66-
test('import - true (boolean)', async () => {
66+
it('import - true (boolean)', async () => {
6767
const config = {
6868
loader: {
6969
options: {
@@ -77,7 +77,7 @@ describe('Validation Errors', () => {
7777
expect(stats.compilation.errors).toMatchSnapshot('errors');
7878
});
7979

80-
test('import - false (boolean)', async () => {
80+
it('import - false (boolean)', async () => {
8181
const config = {
8282
loader: {
8383
options: {
@@ -91,7 +91,7 @@ describe('Validation Errors', () => {
9191
expect(stats.compilation.errors).toMatchSnapshot('errors');
9292
});
9393

94-
test('import - true (string)', async () => {
94+
it('import - true (string)', async () => {
9595
const config = {
9696
loader: {
9797
options: {
@@ -107,7 +107,7 @@ describe('Validation Errors', () => {
107107
expect(normalizeErrors(stats.compilation.errors)).toMatchSnapshot('errors');
108108
});
109109

110-
test('sourceMap - true (boolean)', async () => {
110+
it('sourceMap - true (boolean)', async () => {
111111
const config = {
112112
loader: {
113113
options: {
@@ -121,7 +121,7 @@ describe('Validation Errors', () => {
121121
expect(stats.compilation.errors).toMatchSnapshot('errors');
122122
});
123123

124-
test('sourceMap - false (boolean)', async () => {
124+
it('sourceMap - false (boolean)', async () => {
125125
const config = {
126126
loader: {
127127
options: {
@@ -135,7 +135,7 @@ describe('Validation Errors', () => {
135135
expect(stats.compilation.errors).toMatchSnapshot('errors');
136136
});
137137

138-
test('sourceMap - true (string)', async () => {
138+
it('sourceMap - true (string)', async () => {
139139
const config = {
140140
loader: {
141141
options: {
@@ -151,7 +151,7 @@ describe('Validation Errors', () => {
151151
expect(normalizeErrors(stats.compilation.errors)).toMatchSnapshot('errors');
152152
});
153153

154-
test('importLoaders - 0 (number)', async () => {
154+
it('importLoaders - 0 (number)', async () => {
155155
const config = {
156156
loader: {
157157
options: {
@@ -165,7 +165,7 @@ describe('Validation Errors', () => {
165165
expect(stats.compilation.errors).toMatchSnapshot('errors');
166166
});
167167

168-
test('importLoaders - 1 (number)', async () => {
168+
it('importLoaders - 1 (number)', async () => {
169169
const config = {
170170
loader: {
171171
options: {
@@ -179,7 +179,7 @@ describe('Validation Errors', () => {
179179
expect(stats.compilation.errors).toMatchSnapshot('errors');
180180
});
181181

182-
test('importLoaders - 1 (string)', async () => {
182+
it('importLoaders - 1 (string)', async () => {
183183
const config = {
184184
loader: {
185185
options: {

0 commit comments

Comments
 (0)