mocha-steps: update to 1.3 with mocha 6.0 (#37440)

* mocha-steps: update to 1.3 with mocha 6.0

* mocha-steps: both export and declare global
This commit is contained in:
Piotr Roszatycki
2019-08-08 18:08:17 +02:00
committed by Nathan Shively-Sanders
parent e579edae70
commit 659898602e
2 changed files with 19 additions and 3 deletions

View File

@@ -1,10 +1,16 @@
// Type definitions for mocha-steps 1.1
// Type definitions for mocha-steps 1.3
// Project: https://github.com/rprieto/mocha-steps
// Definitions by: AryloYeung <https://github.com/Arylo>
// Piotr Roszatycki <https://github.com/dex4er>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
/// <reference types="mocha" />
declare var step: Mocha.IContextDefinition;
declare var xstep: Mocha.IContextDefinition;
export function step(title: string, fn?: Mocha.Func): Mocha.Test;
export function xstep(title: string, fn?: Mocha.Func): Mocha.Test;
declare global {
function step(title: string, fn?: Mocha.Func): Mocha.Test;
function xstep(title: string, fn?: Mocha.Func): Mocha.Test;
}

View File

@@ -1,3 +1,5 @@
import * as MochaSteps from "mocha-steps";
describe("Mocha Steps Test", () => {
step("Step Test", () => {
const module_name = "mocha-steps";
@@ -6,4 +8,12 @@ describe("Mocha Steps Test", () => {
xstep("Skip Step Test", () => {
const module_name = "mocha-steps";
});
MochaSteps.step("Step Test", () => {
const module_name = "mocha-steps";
});
MochaSteps.xstep("Skip Step Test", () => {
const module_name = "mocha-steps";
});
});