@@ -14,6 +14,7 @@ logger.transports["console.info"].silent = true;
14
14
15
15
describe ( "buildInfo" , ( ) => {
16
16
let args = testObjects . buildInfoSampleArgs ;
17
+ let rawArgs = testObjects . buildInfoSampleRawArgs ;
17
18
let body = testObjects . buildInfoSampleBody ;
18
19
let bsConfig = testObjects . sampleBsConfig ;
19
20
@@ -66,12 +67,12 @@ describe("buildInfo", () => {
66
67
67
68
validateBstackJsonStub . returns ( Promise . resolve ( bsConfig ) ) ;
68
69
69
- return info ( args )
70
+ return info ( args , rawArgs )
70
71
. then ( function ( _bsConfig ) {
71
72
sinon . assert . calledOnce ( requestStub ) ;
72
73
sinon . assert . calledOnce ( getConfigPathStub ) ;
73
74
sinon . assert . calledOnce ( getUserAgentStub ) ;
74
- sinon . assert . calledOnceWithExactly ( sendUsageReportStub , bsConfig , args , message , messageType , errorCode ) ;
75
+ sinon . assert . calledOnceWithExactly ( sendUsageReportStub , bsConfig , args , message , messageType , errorCode , null , rawArgs ) ;
75
76
} ) . catch ( ( error ) => {
76
77
chai . assert . isNotOk ( error , 'Promise error' ) ;
77
78
} ) ;
@@ -104,12 +105,12 @@ describe("buildInfo", () => {
104
105
105
106
validateBstackJsonStub . returns ( Promise . resolve ( bsConfig ) ) ;
106
107
107
- return info ( args )
108
+ return info ( args , rawArgs )
108
109
. then ( function ( _bsConfig ) {
109
110
sinon . assert . calledOnce ( requestStub ) ;
110
111
sinon . assert . calledOnce ( getUserAgentStub ) ;
111
112
sinon . assert . calledOnce ( getConfigPathStub ) ;
112
- sinon . assert . calledOnceWithExactly ( sendUsageReportStub , bsConfig , args , message , messageType , errorCode ) ;
113
+ sinon . assert . calledOnceWithExactly ( sendUsageReportStub , bsConfig , args , message , messageType , errorCode , null , rawArgs ) ;
113
114
} )
114
115
. catch ( ( error ) => {
115
116
chai . assert . isNotOk ( error , "Promise error" ) ;
@@ -166,12 +167,12 @@ describe("buildInfo", () => {
166
167
167
168
validateBstackJsonStub . returns ( Promise . resolve ( bsConfig ) ) ;
168
169
169
- return info ( args )
170
+ return info ( args , rawArgs )
170
171
. then ( function ( _bsConfig ) {
171
172
sinon . assert . calledOnce ( requestStub ) ;
172
173
sinon . assert . calledOnce ( getUserAgentStub ) ;
173
174
sinon . assert . calledOnce ( getConfigPathStub ) ;
174
- sinon . assert . calledOnceWithExactly ( sendUsageReportStub , bsConfig , args , message , messageType , errorCode ) ;
175
+ sinon . assert . calledOnceWithExactly ( sendUsageReportStub , bsConfig , args , message , messageType , errorCode , null , rawArgs ) ;
175
176
} )
176
177
. catch ( ( error ) => {
177
178
chai . assert . isNotOk ( error , "Promise error" ) ;
@@ -210,12 +211,12 @@ describe("buildInfo", () => {
210
211
211
212
validateBstackJsonStub . returns ( Promise . resolve ( bsConfig ) ) ;
212
213
213
- return info ( args )
214
+ return info ( args , rawArgs )
214
215
. then ( function ( _bsConfig ) {
215
216
sinon . assert . calledOnce ( requestStub ) ;
216
217
sinon . assert . calledOnce ( getUserAgentStub ) ;
217
218
sinon . assert . calledOnce ( getConfigPathStub ) ;
218
- sinon . assert . calledOnceWithExactly ( sendUsageReportStub , bsConfig , args , message , messageType , errorCode ) ;
219
+ sinon . assert . calledOnceWithExactly ( sendUsageReportStub , bsConfig , args , message , messageType , errorCode , null , rawArgs ) ;
219
220
} )
220
221
. catch ( ( error ) => {
221
222
chai . assert . isNotOk ( error , "Promise error" ) ;
@@ -249,12 +250,12 @@ describe("buildInfo", () => {
249
250
250
251
validateBstackJsonStub . returns ( Promise . resolve ( bsConfig ) ) ;
251
252
252
- return info ( args )
253
+ return info ( args , rawArgs )
253
254
. then ( function ( _bsConfig ) {
254
255
sinon . assert . calledOnce ( requestStub ) ;
255
256
sinon . assert . calledOnce ( getUserAgentStub ) ;
256
257
sinon . assert . calledOnce ( getConfigPathStub ) ;
257
- sinon . assert . calledOnceWithExactly ( sendUsageReportStub , bsConfig , args , message , messageType , errorCode ) ;
258
+ sinon . assert . calledOnceWithExactly ( sendUsageReportStub , bsConfig , args , message , messageType , errorCode , null , rawArgs ) ;
258
259
} )
259
260
. catch ( ( error ) => {
260
261
chai . assert . isNotOk ( error , "Promise error" ) ;
@@ -311,12 +312,12 @@ describe("buildInfo", () => {
311
312
312
313
validateBstackJsonStub . returns ( Promise . resolve ( bsConfig ) ) ;
313
314
314
- return info ( args )
315
+ return info ( args , rawArgs )
315
316
. then ( function ( _bsConfig ) {
316
317
sinon . assert . calledOnce ( requestStub ) ;
317
318
sinon . assert . calledOnce ( getUserAgentStub ) ;
318
319
sinon . assert . calledOnce ( getConfigPathStub ) ;
319
- sinon . assert . calledOnceWithExactly ( sendUsageReportStub , bsConfig , args , message , messageType , errorCode ) ;
320
+ sinon . assert . calledOnceWithExactly ( sendUsageReportStub , bsConfig , args , message , messageType , errorCode , null , rawArgs ) ;
320
321
} ) . catch ( ( error ) => {
321
322
chai . assert . isNotOk ( error , 'Promise error' ) ;
322
323
} ) ;
@@ -363,11 +364,11 @@ describe("buildInfo", () => {
363
364
364
365
validateBstackJsonStub . returns ( Promise . reject ( { message : "reject error" } ) ) ;
365
366
366
- return info ( args )
367
+ return info ( args , rawArgs )
367
368
. then ( function ( _bsConfig ) {
368
369
chai . assert . fail ( "Promise error" ) ;
369
370
} ) . catch ( ( error ) => {
370
- sinon . assert . calledOnceWithExactly ( sendUsageReportStub , null , args , "reject error" , Constants . messageTypes . ERROR , "random-error" ) ;
371
+ sinon . assert . calledOnceWithExactly ( sendUsageReportStub , null , args , "reject error" , Constants . messageTypes . ERROR , "random-error" , null , rawArgs ) ;
371
372
} ) ;
372
373
} ) ;
373
374
} ) ;
0 commit comments