Build(deps-dev): bump nock from 11.0.0-beta.14 to 11.0.0-beta.19 (#3552)
* Build(deps-dev): bump nock from 11.0.0-beta.14 to 11.0.0-beta.19 Bumps [nock](https://github.com/nock/nock) from 11.0.0-beta.14 to 11.0.0-beta.19. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/beta/CHANGELOG.md) - [Commits](https://github.com/nock/nock/commits) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Fix one test * Update for breaking change in nock api * Always use got without retries in tests
This commit is contained in:
committed by
Paul Melnikow
parent
fe76a55e2c
commit
95b6e48bff
@@ -2,11 +2,11 @@
|
||||
|
||||
const { expect } = require('chai')
|
||||
const Camp = require('camp')
|
||||
const got = require('got')
|
||||
const sinon = require('sinon')
|
||||
const portfinder = require('portfinder')
|
||||
const queryString = require('query-string')
|
||||
const nock = require('nock')
|
||||
const got = require('../../../core/got-test-client')
|
||||
const serverSecrets = require('../../../lib/server-secrets')
|
||||
const acceptor = require('./acceptor')
|
||||
|
||||
@@ -90,10 +90,19 @@ describe('Github token acceptor', function() {
|
||||
.post('/login/oauth/access_token')
|
||||
.reply((url, requestBody) => {
|
||||
expect(queryString.parse(requestBody).code).to.equal(fakeCode)
|
||||
return queryString.stringify({ access_token: fakeAccessToken })
|
||||
return [
|
||||
200,
|
||||
queryString.stringify({ access_token: fakeAccessToken }),
|
||||
]
|
||||
})
|
||||
})
|
||||
|
||||
afterEach(function() {
|
||||
// Make sure other tests will make live requests even when this test
|
||||
// fails.
|
||||
nock.enableNetConnect()
|
||||
})
|
||||
|
||||
afterEach(function() {
|
||||
if (scope) {
|
||||
scope.done()
|
||||
@@ -102,7 +111,6 @@ describe('Github token acceptor', function() {
|
||||
})
|
||||
|
||||
afterEach(function() {
|
||||
nock.enableNetConnect()
|
||||
nock.cleanAll()
|
||||
})
|
||||
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
const { expect } = require('chai')
|
||||
const sinon = require('sinon')
|
||||
const Camp = require('camp')
|
||||
// https://github.com/nock/nock/issues/1523
|
||||
const got = require('got').extend({ retry: 0 })
|
||||
const portfinder = require('portfinder')
|
||||
const serverSecrets = require('../../../lib/server-secrets')
|
||||
const got = require('../../../core/got-test-client')
|
||||
const GithubApiProvider = require('../github-api-provider')
|
||||
const { setRoutes } = require('./admin')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user