Skip to content

Commit 8841fce

Browse files
Raymond Fengraymondfeng
authored andcommitted
fix(testlab): Remove sinon-should integration
The sinon-should integration has some bad side effects, for example: expect(() => throw new Error()).to.throw(...) is broken. Also see #641
1 parent d52f637 commit 8841fce

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

packages/rest/test/unit/router/reject.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('reject', () => {
3535
reject(mock.response, mock.request, testError);
3636
await mock.result;
3737

38-
expect(logger).to.be.calledWith(testError, 500, mock.request);
38+
sinon.assert.calledWith(logger, testError, 500, mock.request);
3939
});
4040

4141
function givenMockedResponse() {

packages/testlab/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@
2121
"dependencies": {
2222
"@loopback/openapi-spec": "^4.0.0-alpha.10",
2323
"@types/shot": "^3.4.0",
24-
"@types/sinon": "^2.3.2",
24+
"@types/sinon": "^2.3.6",
2525
"@types/supertest": "^2.0.0",
2626
"@types/swagger-parser": "^4.0.1",
27-
"shot": "^3.4.0",
28-
"should": "^11.2.1",
29-
"should-sinon": "0.0.5",
30-
"sinon": "^2.4.0",
27+
"shot": "^4.0.2",
28+
"should": "^13.1.2",
29+
"sinon": "^4.0.1",
3130
"supertest": "^3.0.0",
3231
"swagger-parser": "^3.4.1"
3332
},

packages/testlab/src/testlab.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
/// <reference path="../should-as-function.d.ts" />
77

88
const shouldAsFunction: Internal = require('should/as-function');
9-
import 'should-sinon';
109

1110
import sinon = require('sinon');
1211
import {SinonSpy} from 'sinon';

0 commit comments

Comments
 (0)