@@ -493,19 +493,30 @@ describe('140. v8Getter.js', function() {
493
493
describe ( '140.7 Negative: Pool object' , function ( ) {
494
494
495
495
var dotest = function ( opt , cb ) {
496
- oracledb . createPool (
497
- opt ,
498
- function ( err , pool ) {
499
- should . exist ( err ) ;
500
- should . not . exist ( pool ) ;
501
- cb ( ) ;
502
- }
496
+
497
+ should . throws (
498
+ function ( ) {
499
+ oracledb . createPool (
500
+ opt ,
501
+ function ( err , pool ) {
502
+ should . not . exist ( err ) ;
503
+ should . exist ( pool ) ;
504
+
505
+ pool . close ( function ( err ) {
506
+
507
+ should . not . exist ( err ) ;
508
+ cb ( ) ;
509
+ } ) ;
510
+ }
511
+ ) ;
512
+ } ,
513
+ / N o p e /
503
514
) ;
504
515
} ;
505
516
506
- it . skip ( '140.7.1 String type - user' , function ( done ) {
517
+ it ( '140.7.1 String type - user' , function ( done ) {
507
518
508
- var cred = dbConfig ;
519
+ var cred = JSON . parse ( JSON . stringify ( dbConfig ) ) ;
509
520
Object . defineProperty ( cred , 'user' , {
510
521
get : function ( ) {
511
522
throw 'Nope' ;
@@ -514,9 +525,9 @@ describe('140. v8Getter.js', function() {
514
525
dotest ( cred , done ) ;
515
526
} ) ;
516
527
517
- it . skip ( '140.7.2 String type - password' , function ( done ) {
528
+ it ( '140.7.2 String type - password' , function ( done ) {
518
529
519
- var cred = dbConfig ;
530
+ var cred = JSON . parse ( JSON . stringify ( dbConfig ) ) ;
520
531
Object . defineProperty ( cred , 'password' , {
521
532
get : function ( ) {
522
533
throw 'Nope' ;
@@ -525,9 +536,9 @@ describe('140. v8Getter.js', function() {
525
536
dotest ( cred , done ) ;
526
537
} ) ;
527
538
528
- it . skip ( '140.7.3 String type - connectString' , function ( done ) {
539
+ it ( '140.7.3 String type - connectString' , function ( done ) {
529
540
530
- var cred = dbConfig ;
541
+ var cred = JSON . parse ( JSON . stringify ( dbConfig ) ) ;
531
542
Object . defineProperty ( cred , 'connectString' , {
532
543
get : function ( ) {
533
544
throw 'Nope' ;
@@ -536,9 +547,9 @@ describe('140. v8Getter.js', function() {
536
547
dotest ( cred , done ) ;
537
548
} ) ;
538
549
539
- it . skip ( '140.7.4 poolMin' , function ( done ) {
550
+ it ( '140.7.4 poolMin' , function ( done ) {
540
551
541
- var cred = dbConfig ;
552
+ var cred = JSON . parse ( JSON . stringify ( dbConfig ) ) ;
542
553
Object . defineProperty ( cred , 'poolMin' , {
543
554
get : function ( ) {
544
555
throw 'Nope' ;
@@ -547,9 +558,9 @@ describe('140. v8Getter.js', function() {
547
558
dotest ( cred , done ) ;
548
559
} ) ;
549
560
550
- it . skip ( '140.7.5 poolMax' , function ( done ) {
561
+ it ( '140.7.5 poolMax' , function ( done ) {
551
562
552
- var cred = dbConfig ;
563
+ var cred = JSON . parse ( JSON . stringify ( dbConfig ) ) ;
553
564
Object . defineProperty ( cred , 'poolMax' , {
554
565
get : function ( ) {
555
566
throw 'Nope' ;
@@ -558,9 +569,9 @@ describe('140. v8Getter.js', function() {
558
569
dotest ( cred , done ) ;
559
570
} ) ;
560
571
561
- it . skip ( '140.7.6 poolIncrement' , function ( done ) {
572
+ it ( '140.7.6 poolIncrement' , function ( done ) {
562
573
563
- var cred = dbConfig ;
574
+ var cred = JSON . parse ( JSON . stringify ( dbConfig ) ) ;
564
575
Object . defineProperty ( cred , 'poolIncrement' , {
565
576
get : function ( ) {
566
577
throw 'Nope' ;
@@ -569,9 +580,9 @@ describe('140. v8Getter.js', function() {
569
580
dotest ( cred , done ) ;
570
581
} ) ;
571
582
572
- it . skip ( '140.7.7 poolTimeout' , function ( done ) {
583
+ it ( '140.7.7 poolTimeout' , function ( done ) {
573
584
574
- var cred = dbConfig ;
585
+ var cred = JSON . parse ( JSON . stringify ( dbConfig ) ) ;
575
586
Object . defineProperty ( cred , 'poolTimeout' , {
576
587
get : function ( ) {
577
588
throw 'Nope' ;
@@ -580,9 +591,9 @@ describe('140. v8Getter.js', function() {
580
591
dotest ( cred , done ) ;
581
592
} ) ;
582
593
583
- it . skip ( '140.7.8 poolPingInterval' , function ( done ) {
594
+ it ( '140.7.8 poolPingInterval' , function ( done ) {
584
595
585
- var cred = dbConfig ;
596
+ var cred = JSON . parse ( JSON . stringify ( dbConfig ) ) ;
586
597
Object . defineProperty ( cred , 'poolPingInterval' , {
587
598
get : function ( ) {
588
599
throw 'Nope' ;
@@ -592,31 +603,9 @@ describe('140. v8Getter.js', function() {
592
603
dotest ( cred , done ) ;
593
604
} ) ;
594
605
595
- it . skip ( '140.7.9 queueRequests' , function ( done ) {
596
-
597
- var cred = dbConfig ;
598
- Object . defineProperty ( cred , 'queueRequests' , {
599
- get : function ( ) {
600
- throw 'Nope' ;
601
- }
602
- } ) ;
603
- dotest ( cred , done ) ;
604
- } ) ;
605
-
606
- it . skip ( '140.7.10 stmtCacheSize' , function ( done ) {
607
-
608
- var cred = dbConfig ;
609
- Object . defineProperty ( cred , 'stmtCacheSize' , {
610
- get : function ( ) {
611
- throw 'Nope' ;
612
- }
613
- } ) ;
614
- dotest ( cred , done ) ;
615
- } ) ;
616
-
617
- it . skip ( '140.7.11 stmtCacheSize' , function ( done ) {
606
+ it ( '140.7.9 stmtCacheSize' , function ( done ) {
618
607
619
- var cred = dbConfig ;
608
+ var cred = JSON . parse ( JSON . stringify ( dbConfig ) ) ;
620
609
Object . defineProperty ( cred , 'stmtCacheSize' , {
621
610
get : function ( ) {
622
611
throw 'Nope' ;
@@ -625,29 +614,7 @@ describe('140. v8Getter.js', function() {
625
614
dotest ( cred , done ) ;
626
615
} ) ;
627
616
628
- it . skip ( '140.7.12 poolAlias' , function ( done ) {
629
-
630
- var cred = dbConfig ;
631
- Object . defineProperty ( cred , 'poolAlias' , {
632
- get : function ( ) {
633
- throw 'Nope' ;
634
- }
635
- } ) ;
636
- dotest ( cred , done ) ;
637
- } ) ;
638
-
639
- it . skip ( '140.7.13 queueTimeout' , function ( done ) {
640
-
641
- var cred = dbConfig ;
642
- Object . defineProperty ( cred , 'queueTimeout' , {
643
- get : function ( ) {
644
- throw 'Nope' ;
645
- }
646
- } ) ;
647
- dotest ( cred , done ) ;
648
- } ) ;
649
-
650
- it . skip ( '140.7.14 connecionsOpen' , function ( done ) {
617
+ it ( '140.7.10 connecionsOpen' , function ( done ) {
651
618
652
619
oracledb . createPool (
653
620
dbConfig ,
@@ -656,20 +623,26 @@ describe('140. v8Getter.js', function() {
656
623
657
624
Object . defineProperty ( pool , 'connecionsOpen' , {
658
625
get : function ( ) {
659
- throw 'Nope ' ;
626
+ throw 'Property Wrong ' ;
660
627
}
661
628
} ) ;
662
- console . log ( pool . connecionsOpen ) ;
663
629
664
- pool . Close ( function ( err ) {
630
+ should . throws (
631
+ function ( ) {
632
+ console . log ( pool . connecionsOpen ) ;
633
+ } ,
634
+ / P r o p e r t y W r o n g /
635
+ ) ;
636
+
637
+ pool . close ( function ( err ) {
665
638
should . not . exist ( err ) ;
666
639
done ( ) ;
667
640
} ) ;
668
641
}
669
642
) ;
670
643
} ) ;
671
644
672
- it . skip ( '140.7.15 connecionsInUse' , function ( done ) {
645
+ it ( '140.7.11 connecionsInUse' , function ( done ) {
673
646
674
647
oracledb . createPool (
675
648
dbConfig ,
@@ -678,12 +651,17 @@ describe('140. v8Getter.js', function() {
678
651
679
652
Object . defineProperty ( pool , 'connecionsInUse' , {
680
653
get : function ( ) {
681
- throw 'Nope ' ;
654
+ throw 'Property Wrong ' ;
682
655
}
683
656
} ) ;
684
- console . log ( pool . connecionsInUse ) ;
657
+ should . throws (
658
+ function ( ) {
659
+ console . log ( pool . connecionsInUse ) ;
660
+ } ,
661
+ / P r o p e r t y W r o n g /
662
+ ) ;
685
663
686
- pool . Close ( function ( err ) {
664
+ pool . close ( function ( err ) {
687
665
should . not . exist ( err ) ;
688
666
done ( ) ;
689
667
} ) ;
@@ -693,52 +671,62 @@ describe('140. v8Getter.js', function() {
693
671
694
672
} ) ; // 140.7
695
673
696
- describe ( '140.8 Negative Connection object' , function ( ) {
697
- it . skip ( '140.8.1 String type: user' , function ( done ) {
698
- var cred = dbConfig ;
699
- Object . defineProperty ( cred , 'user' , {
700
- get : function ( ) { throw 'Nope' ; } } ) ;
674
+ describe ( '140.8 Negative: Get Connection' , function ( ) {
675
+
676
+ it ( '140.8.1 String type: user' , function ( done ) {
701
677
702
- oracledb . getConnection (
703
- cred ,
704
- function ( err , connection ) {
705
- should . exist ( err ) ;
706
- should . not . exist ( connection ) ;
678
+ var cred = JSON . parse ( JSON . stringify ( dbConfig ) ) ;
679
+ Object . defineProperty ( cred , 'user' , {
680
+ get : function ( ) {
681
+ throw 'Nope' ;
707
682
}
683
+ } ) ;
684
+
685
+ should . throws (
686
+ function ( ) {
687
+ oracledb . getConnection ( cred , function ( ) { } ) ;
688
+ } ,
689
+ / N o p e /
708
690
) ;
709
- done ( ) ;
691
+ done ( ) ;
710
692
} ) ;
711
693
712
- it . skip ( '140.8.2 String type: password' , function ( done ) {
713
- var cred = dbConfig ;
714
- Object . defineProperty ( cred , 'password' , {
715
- get : function ( ) { throw 'Nope' ; } } ) ;
694
+ it ( '140.8.2 String type: password' , function ( done ) {
716
695
717
- oracledb . getConnection (
718
- cred ,
719
- function ( err , connection ) {
720
- should . exist ( err ) ;
721
- should . not . exist ( connection ) ;
696
+ var cred = JSON . parse ( JSON . stringify ( dbConfig ) ) ;
697
+ Object . defineProperty ( cred , 'password' , {
698
+ get : function ( ) {
699
+ throw 'Nope' ;
722
700
}
701
+ } ) ;
702
+
703
+ should . throws (
704
+ function ( ) {
705
+ oracledb . getConnection ( cred , function ( ) { } ) ;
706
+ } ,
707
+ / N o p e /
723
708
) ;
724
- done ( ) ;
709
+ done ( ) ;
725
710
} ) ;
726
711
727
- it . skip ( '140.8.3 String type: connectionString' , function ( done ) {
728
- var cred = dbConfig ;
729
- Object . defineProperty ( cred , 'connectionString' , {
730
- get : function ( ) { throw 'Nope' ; } } ) ;
712
+ it ( '140.8.3 String type: connectionString' , function ( done ) {
731
713
732
- oracledb . getConnection (
733
- cred ,
734
- function ( err , connection ) {
735
- should . exist ( err ) ;
736
- should . not . exist ( connection ) ;
714
+ var cred = JSON . parse ( JSON . stringify ( dbConfig ) ) ;
715
+ Object . defineProperty ( cred , 'connectString' , {
716
+ get : function ( ) {
717
+ throw 'Nope' ;
737
718
}
719
+ } ) ;
720
+
721
+ should . throws (
722
+ function ( ) {
723
+ oracledb . getConnection ( cred , function ( ) { } ) ;
724
+ } ,
725
+ / N o p e /
738
726
) ;
739
- done ( ) ;
727
+ done ( ) ;
740
728
} ) ;
741
729
742
- } ) ;
730
+ } ) ; // 140.8
743
731
744
732
} ) ;
0 commit comments