From 924bcd457ff84c1c48fb7db7196ac6da3edfc0ad Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 23 Dec 2019 11:23:33 -0500 Subject: [PATCH] [newman] Adding missing fields to NewmanRunFailure. (#41033) * Adding missing fields to NewmanRunFailure. * Fixing reviewer issues. * Fixing test file. --- types/newman/index.d.ts | 6 +++++- types/newman/newman-tests.ts | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/types/newman/index.d.ts b/types/newman/index.d.ts index 7bd7aef744..101344f756 100644 --- a/types/newman/index.d.ts +++ b/types/newman/index.d.ts @@ -173,10 +173,14 @@ export interface NewmanRunExecutionAssertionError { test: string; message: string; stack: string; -}export interface NewmanRunFailure { +} +export interface NewmanRunFailure { error: NewmanRunExecutionAssertionError; /** The event where the failure occurred */ at: string; + source: NewmanRunExecutionItem | undefined; + parent: any; + cursor: { ref: string } | {}; } export function run( options: NewmanRunOptions, diff --git a/types/newman/newman-tests.ts b/types/newman/newman-tests.ts index 51a790ab2f..ff6a4666cd 100644 --- a/types/newman/newman-tests.ts +++ b/types/newman/newman-tests.ts @@ -29,5 +29,6 @@ run( summary.run; // $ExpectType NewmanRun summary.run.executions; // $ExpectType NewmanRunExecution[] summary.run.failures; // $ExpectType NewmanRunFailure[] + summary.run.failures[0].source; // $ExpectType NewmanRunExecutionItem | undefined } );