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

Commit

Permalink
fix: loosen deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 10, 2019
1 parent 6a3c7ad commit 11f9a9e
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 84 deletions.
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@
"author": "Jeff Dickey @jdxcode",
"bugs": "https://github.com/jdxcode/fancy-test/issues",
"dependencies": {
"@types/chai": "^4.1.4",
"@types/lodash": "^4.14.116",
"@types/mocha": "^5.2.5",
"@types/nock": "^9.3.0",
"@types/node": "^10.9.4",
"@types/sinon": "^5.0.2",
"@types/chai": "*",
"@types/lodash": "*",
"@types/mocha": "*",
"@types/nock": "*",
"@types/node": "*",
"@types/sinon": "*",
"lodash": "^4.17.11",
"mock-stdin": "^0.3.1",
"stdout-stderr": "^0.1.9"
},
"devDependencies": {
"@oclif/tslint": "^3.1.0",
"chai": "^4.1.2",
"chalk": "^2.4.1",
"http-call": "^5.2.2",
"@oclif/tslint": "^3.1.1",
"chai": "^4.2.0",
"chalk": "^2.4.2",
"http-call": "^5.2.3",
"markdown-toc": "^1.2.0",
"mocha": "^5.2.0",
"nock": "^9.6.1",
"sinon": "^6.3.2",
"nock": "^10.0.6",
"sinon": "^7.2.2",
"ts-node": "^7.0.1",
"tslib": "^1.9.3",
"tslint": "^5.11.0",
"typescript": "^3.0.3"
"tslint": "^5.12.0",
"typescript": "^3.2.2"
},
"engines": {
"node": ">=8.0.0"
Expand Down
4 changes: 2 additions & 2 deletions src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ const base = <I extends Types.Context>(context: I): Types.Base<I, {}> => {
arg1 = undefined
}
if (!arg1) arg1 = context.expectation || 'test'
async function run(this: Types.ITestCallbackContext, done?: Types.MochaDone) {
async function run(this: Types.ITestCallbackContext, done?: Mocha.Done) {
context = assignWithProps({}, originalContext)
if (context.retries) this.retries(context.retries)
if (cb) {
context.chain = [...context.chain, {
run: async (input: any) => {
await cb.call(this, input, done)
await cb.call(this, input, done!)
}
}]
}
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import * as Nock from './nock'
import {stderr, stdin, stdout} from './stdmock'
import stub from './stub'
import timeout from './timeout'

import * as FancyTypes from './types'

export const fancy = base
Expand Down
4 changes: 1 addition & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface ITestCallbackContext {
[index: string]: any
}

export type MochaCallback<I> = (this: ITestCallbackContext, context: I, done: MochaDone) => any
export type MochaCallback<I> = (this: ITestCallbackContext, context: I, done: Mocha.Done) => any
export interface It<I> {
(expectation: string, cb?: MochaCallback<I>): void
(cb?: MochaCallback<I>): void
Expand All @@ -52,8 +52,6 @@ export interface EnvOptions {
clear?: boolean
}

export type MochaDone = (error?: any) => any

export interface NockScope extends Nock.Scope {}
export interface NockOptions extends Nock.Options {}
export type NockCallback = (nock: NockScope) => any
Loading

0 comments on commit 11f9a9e

Please sign in to comment.