Fix [codeclimate] tests (#1727)
* update nock The version we were using didn't allow regex pattern with allowUnmocked option. Update to latest version which includes this patch: https://github.com/node-nock/nock/pull/1068 * update codeclimate test to allow any snapshot id on second call This test was failing because the snapshot id changed for some reason. This change allows that to happen and we will still intercept the second API call.
This commit is contained in:
69
package-lock.json
generated
69
package-lock.json
generated
@@ -8764,54 +8764,47 @@
|
||||
}
|
||||
},
|
||||
"nock": {
|
||||
"version": "9.0.22",
|
||||
"resolved": "https://registry.npmjs.org/nock/-/nock-9.0.22.tgz",
|
||||
"integrity": "sha512-F5+Z5jhDourTtGIAEdqdtLhuAqO22Kg2rrvszgxwDPl8rMkw/pY0RJUHvFV/4bv1/oReZRAokMNGrUIQlKi/BQ==",
|
||||
"version": "9.3.2",
|
||||
"resolved": "https://registry.npmjs.org/nock/-/nock-9.3.2.tgz",
|
||||
"integrity": "sha512-pulpsRVFneYGpgktmt99s10fFh10zSpYhydwkG28xLps/p19n39lBSq5kjb7UW2YOPyQtt7FLyXuP+xHyRRI0w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chai": "3.5.0",
|
||||
"debug": "2.2.0",
|
||||
"chai": "4.1.2",
|
||||
"debug": "3.1.0",
|
||||
"deep-equal": "1.0.1",
|
||||
"json-stringify-safe": "5.0.1",
|
||||
"lodash": "4.17.4",
|
||||
"lodash": "4.17.10",
|
||||
"mkdirp": "0.5.1",
|
||||
"propagate": "0.4.0",
|
||||
"qs": "6.4.0",
|
||||
"propagate": "1.0.0",
|
||||
"qs": "6.5.2",
|
||||
"semver": "5.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"chai": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz",
|
||||
"integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=",
|
||||
"debug": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"assertion-error": "1.0.2",
|
||||
"deep-eql": "0.1.3",
|
||||
"type-detect": "1.0.0"
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"deep-eql": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz",
|
||||
"integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"type-detect": "0.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"type-detect": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz",
|
||||
"integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
"lodash": {
|
||||
"version": "4.17.10",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
|
||||
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
|
||||
"dev": true
|
||||
},
|
||||
"type-detect": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz",
|
||||
"integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=",
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
},
|
||||
"qs": {
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
|
||||
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
@@ -12013,9 +12006,9 @@
|
||||
}
|
||||
},
|
||||
"propagate": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/propagate/-/propagate-0.4.0.tgz",
|
||||
"integrity": "sha1-8/zKCm/gZzanulcpZgaWF8EwtIE=",
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/propagate/-/propagate-1.0.0.tgz",
|
||||
"integrity": "sha1-AMLa7t2iDofjeCs0Stuhzd1q1wk=",
|
||||
"dev": true
|
||||
},
|
||||
"proto-list": {
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
"mkdirp": "^0.5.1",
|
||||
"mocha": "^5.0.0",
|
||||
"next": "^5.0.0",
|
||||
"nock": "^9.0.13",
|
||||
"nock": "^9.3.2",
|
||||
"node-fetch": "^2.0.0",
|
||||
"nyc": "^12.0.1",
|
||||
"opn-cli": "^3.1.0",
|
||||
|
||||
@@ -110,7 +110,7 @@ t.create('malformed response for outer user repos query')
|
||||
t.create('malformed response for inner specific repo query')
|
||||
.get('/maintainability/angular/angular.js.json')
|
||||
.intercept(nock => nock('https://api.codeclimate.com', {allowUnmocked: true})
|
||||
.get('/v1/repos/526933117e00a40567008444/snapshots/5ab4427859c16c0001003cad')
|
||||
.get(/\/v1\/repos\/[a-z0-9]+\/snapshots\/[a-z0-9]+/)
|
||||
.reply(200, {})) // No data.
|
||||
.networkOn() // Combined with allowUnmocked: true, this allows the outer user repos query to go through.
|
||||
.expectJSON({
|
||||
|
||||
Reference in New Issue
Block a user