Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 590f40d

Browse files
committed
refactor(tests): update assertion for jest
1 parent 6a14e89 commit 590f40d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/bundle.spec.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('bundle task', () => {
3232
}).catch(err => {
3333
// assert
3434
expect(rollup.rollup).toHaveBeenCalled();
35-
expect(err.message).toBe(errorText, `Received ${err.message} instead of expected ${errorText}`);
35+
expect(err.message).toBe(errorText);
3636
done();
3737
});
3838
});
@@ -62,7 +62,7 @@ describe('bundle task', () => {
6262
}).catch(err => {
6363
// assert
6464
expect(webpack.webpack).toHaveBeenCalled();
65-
expect(err.message).toBe(errorText, `Received ${err.message} instead of expected ${errorText}`);
65+
expect(err.message).toBe(errorText);
6666
done();
6767
});
6868
});
@@ -96,7 +96,7 @@ describe('bundle task', () => {
9696
}).catch(err => {
9797
// assert
9898
expect(rollup.rollupUpdate).toHaveBeenCalled();
99-
expect(err.message).toBe(errorText, `Received ${err.message} instead of expected ${errorText}`);
99+
expect(err.message).toBe(errorText);
100100
done();
101101
});
102102
});
@@ -129,7 +129,7 @@ describe('bundle task', () => {
129129
}).catch(err => {
130130
// assert
131131
expect(webpack.webpackUpdate).toHaveBeenCalled();
132-
expect(err.message).toBe(errorText, `Received ${err.message} instead of expected ${errorText}`);
132+
expect(err.message).toBe(errorText);
133133
done();
134134
});
135135

@@ -152,7 +152,7 @@ describe('bundle task', () => {
152152

153153
// assert
154154
expect(rollup.getRollupConfig).toHaveBeenCalledWith(context, null);
155-
expect(result).toEqual(config.sourceMap, `Expected result ${result} to equal ${config.sourceMap}`);
155+
expect(result).toEqual(config.sourceMap);
156156
});
157157

158158
it('should get false when devtool is null for webpack', () => {
@@ -165,7 +165,7 @@ describe('bundle task', () => {
165165

166166
// assert
167167
expect(webpack.getWebpackConfig).toHaveBeenCalledWith(context, null);
168-
expect(result).toEqual(false, `Expected result ${result} to equal false`);
168+
expect(result).toEqual(false);
169169
});
170170

171171
it('should get false when devtool is valid', () => {
@@ -178,7 +178,7 @@ describe('bundle task', () => {
178178

179179
// assert
180180
expect(webpack.getWebpackConfig).toHaveBeenCalledWith(context, null);
181-
expect(result).toEqual(true, `Expected result ${result} to equal true`);
181+
expect(result).toEqual(true);
182182
});
183183
});
184184

@@ -196,7 +196,7 @@ describe('bundle task', () => {
196196
// assert
197197
expect(rollup.getRollupConfig).toHaveBeenCalledWith(context, null);
198198
expect(rollup.getOutputDest).toHaveBeenCalledWith(context, config);
199-
expect(result).toEqual(returnValue, `Expected result ${result} to equal ${returnValue}`);
199+
expect(result).toEqual(returnValue);
200200
});
201201

202202
it('should get the value from webpack', () => {
@@ -209,7 +209,7 @@ describe('bundle task', () => {
209209

210210
// assert
211211
expect(webpack.getOutputDest).toHaveBeenCalledWith(context);
212-
expect(result).toEqual(returnValue, `Expected result ${result} to equal ${returnValue}`);
212+
expect(result).toEqual(returnValue);
213213
});
214214
});
215215
});

0 commit comments

Comments
 (0)