Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
fix: added nock scope back
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 3, 2018
1 parent 066d4a5 commit 6f30e60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import base from './base'
import _catch from './catch'
import {expect} from './chai'
import env from './env'
import {nock} from './nock'
import {nock, NockScope} from './nock'
import {stderr, stdout} from './stdmock'
import stub from './stub'

Expand All @@ -21,5 +21,6 @@ export type Fancy = typeof fancy
export {
expect,
FancyTypes,
NockScope,
}
export default fancy
6 changes: 2 additions & 4 deletions src/nock.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as _ from 'lodash'
import * as Nock from 'nock'

export function nock(host?: string, cb?: (nock: nock.Scope) => any) {
export function nock(host?: string, cb?: (nock: NockScope) => any) {
if (_.isUndefined(host)) throw new Error('host is undefined')
if (_.isUndefined(cb)) throw new Error('callback is undefined')

Expand All @@ -21,6 +21,4 @@ export function nock(host?: string, cb?: (nock: nock.Scope) => any) {
}
}

export namespace nock {
export interface Scope extends Nock.Scope {}
}
export interface NockScope extends Nock.Scope {}

0 comments on commit 6f30e60

Please sign in to comment.