@@ -125,7 +125,7 @@ describe('plugin:leetcode', function() {
125125 . get ( '/api/problems/concurrency/' )
126126 . replyWithFile ( 200 , './test/mock/problems.json.20160911' ) ;
127127
128- plugin . getProblems ( function ( e , problems ) {
128+ plugin . getProblems ( false , function ( e , problems ) {
129129 assert . equal ( e , null ) ;
130130 assert . equal ( problems . length , 377 * 4 ) ;
131131 done ( ) ;
@@ -149,7 +149,7 @@ describe('plugin:leetcode', function() {
149149 . get ( '/api/problems/concurrency/' )
150150 . replyWithFile ( 200 , './test/mock/problems.json.20160911' ) ;
151151
152- plugin . getProblems ( function ( e , problems ) {
152+ plugin . getProblems ( false , function ( e , problems ) {
153153 assert . equal ( e . message , 'unknown error' ) ;
154154 done ( ) ;
155155 } ) ;
@@ -192,7 +192,7 @@ describe('plugin:leetcode', function() {
192192 . post ( '/graphql' )
193193 . replyWithFile ( 200 , './test/mock/find-the-difference.json.20171216' ) ;
194194
195- plugin . getProblem ( PROBLEM , function ( e , problem ) {
195+ plugin . getProblem ( PROBLEM , false , function ( e , problem ) {
196196 assert . equal ( e , null ) ;
197197 assert . equal ( problem . totalAC , '89.7K' ) ;
198198 assert . equal ( problem . totalSubmit , '175.7K' ) ;
@@ -367,7 +367,7 @@ describe('plugin:leetcode', function() {
367367 it ( 'should fail if no permission for locked' , function ( done ) {
368368 PROBLEM . locked = true ;
369369
370- plugin . getProblem ( PROBLEM , function ( e , problem ) {
370+ plugin . getProblem ( PROBLEM , false , function ( e , problem ) {
371371 assert . equal ( e , 'failed to load locked problem!' ) ;
372372 done ( ) ;
373373 } ) ;
@@ -376,7 +376,7 @@ describe('plugin:leetcode', function() {
376376 it ( 'should fail if session expired' , function ( done ) {
377377 nock ( 'https://leetcode.com' ) . post ( '/graphql' ) . reply ( 403 ) ;
378378
379- plugin . getProblem ( PROBLEM , function ( e , problem ) {
379+ plugin . getProblem ( PROBLEM , false , function ( e , problem ) {
380380 assert . equal ( e , session . errors . EXPIRED ) ;
381381 done ( ) ;
382382 } ) ;
@@ -385,7 +385,7 @@ describe('plugin:leetcode', function() {
385385 it ( 'should fail if http error' , function ( done ) {
386386 nock ( 'https://leetcode.com' ) . post ( '/graphql' ) . reply ( 500 ) ;
387387
388- plugin . getProblem ( PROBLEM , function ( e , problem ) {
388+ plugin . getProblem ( PROBLEM , false , function ( e , problem ) {
389389 assert . deepEqual ( e , { msg : 'http error' , statusCode : 500 } ) ;
390390 done ( ) ;
391391 } ) ;
@@ -394,7 +394,7 @@ describe('plugin:leetcode', function() {
394394 it ( 'should fail if unknown error' , function ( done ) {
395395 nock ( 'https://leetcode.com' ) . post ( '/graphql' ) . replyWithError ( 'unknown error!' ) ;
396396
397- plugin . getProblem ( PROBLEM , function ( e , problem ) {
397+ plugin . getProblem ( PROBLEM , false , function ( e , problem ) {
398398 assert . equal ( e . message , 'unknown error!' ) ;
399399 done ( ) ;
400400 } ) ;
0 commit comments