@@ -58,7 +58,7 @@ describe("ChaosHandler.ts", () => {
5858 } ;
5959
6060 it ( "Should return a valid response object for MANUAL case" , ( ) => {
61- chaosHandler [ "createResponse" ] ( new ChaosHandlerOptions ( ChaosStrategy . MANUAL , 404 ) , cxt ) ;
61+ chaosHandler [ "createResponse" ] ( new ChaosHandlerOptions ( ChaosStrategy . MANUAL , "Manual response" , 404 ) , cxt ) ;
6262 assert . isDefined ( cxt . response ) ;
6363 } ) ;
6464
@@ -90,7 +90,7 @@ describe("ChaosHandler.ts", () => {
9090 } ) ;
9191
9292 it ( "Should send the request to the graph" , async ( ) => {
93- handler [ "sendRequest" ] ( new ChaosHandlerOptions ( ChaosStrategy . RANDOM , undefined , "I generated the error" , 100 ) , cxt ) ;
93+ handler [ "sendRequest" ] ( new ChaosHandlerOptions ( ChaosStrategy . RANDOM , "I generated the error" , undefined , 100 ) , cxt ) ;
9494 assert . isDefined ( cxt . response ) ;
9595 } ) ;
9696 } ) ;
@@ -143,13 +143,13 @@ describe("ChaosHandler.ts", () => {
143143 const tempChaosHandlerManualRegex = new ChaosHandler ( tempManualOptionsRegex , manualMap ) ;
144144
145145 it ( "Should set a statusCode for MANUAL mode" , ( ) => {
146- const tempOptions = new ChaosHandlerOptions ( ChaosStrategy . MANUAL , 404 ) ;
146+ const tempOptions = new ChaosHandlerOptions ( ChaosStrategy . MANUAL , "Set status code" , 404 ) ;
147147 chaosHandler [ "setStatusCode" ] ( tempOptions , "https://graph.microsoft.com/v1.0/me" , RequestMethod . GET ) ;
148148 assert . isDefined ( tempOptions . statusCode ) ;
149149 } ) ;
150150
151151 it ( "Should set a statusCode for RANDOM mode" , ( ) => {
152- const tempOptions = new ChaosHandlerOptions ( ChaosStrategy . RANDOM , undefined , "I generated the error" , 100 ) ;
152+ const tempOptions = new ChaosHandlerOptions ( ChaosStrategy . RANDOM , "I generated the error" , undefined , 100 ) ;
153153 chaosHandler [ "setStatusCode" ] ( tempOptions , "https://graph.microsoft.com/v1.0/me" , RequestMethod . POST ) ;
154154 assert . isDefined ( tempOptions . statusCode ) ;
155155 } ) ;
@@ -167,7 +167,7 @@ describe("ChaosHandler.ts", () => {
167167
168168 describe ( "getOptions" , ( ) => {
169169 it ( "Should return the options in the context object" , ( ) => {
170- const options = new ChaosHandlerOptions ( ChaosStrategy . MANUAL , 405 ) ;
170+ const options = new ChaosHandlerOptions ( ChaosStrategy . MANUAL , "Get options" , 405 ) ;
171171 const cxt : Context = {
172172 request : "url" ,
173173 middlewareControl : new MiddlewareControl ( [ options ] ) ,
@@ -240,7 +240,7 @@ describe("ChaosHandler.ts", () => {
240240 } ) ;
241241
242242 it ( "Should return response for Manual Request Level case" , async ( ) => {
243- const options = new ChaosHandlerOptions ( ChaosStrategy . MANUAL , 200 ) ;
243+ const options = new ChaosHandlerOptions ( ChaosStrategy . MANUAL , "Manual Request level case" , 200 ) ;
244244 const cxt : Context = {
245245 request : "https://graph.microsoft.com/v1.0/me" ,
246246 options : {
0 commit comments