1- module ( " Decorators" )
1+ module ( ' Decorators' ) ;
22
3- var Utils = require ( " select2/utils" ) ;
3+ var Utils = require ( ' select2/utils' ) ;
44
5- test ( " overridden - method" , function ( assert ) {
6- function BaseClass ( ) { } ;
5+ test ( ' overridden - method' , function ( assert ) {
6+ function BaseClass ( ) { }
77
88 BaseClass . prototype . hello = function ( ) {
9- return "A" ;
10- }
9+ return 'A' ;
10+ } ;
1111
12- function DecoratorClass ( ) { } ;
12+ function DecoratorClass ( ) { }
1313
1414 DecoratorClass . prototype . hello = function ( ) {
15- return "B" ;
16- }
15+ return 'B' ;
16+ } ;
1717
1818 var DecoratedClass = Utils . Decorate ( BaseClass , DecoratorClass ) ;
1919
2020 var inst = new DecoratedClass ( ) ;
2121
22- assert . strictEqual ( inst . hello ( ) , "B" ) ;
22+ assert . strictEqual ( inst . hello ( ) , 'B' ) ;
2323} ) ;
2424
25- test ( " overridden - constructor" , function ( assert ) {
25+ test ( ' overridden - constructor' , function ( assert ) {
2626 function BaseClass ( ) {
2727 this . inherited = true ;
28- } ;
28+ }
2929
3030 BaseClass . prototype . hello = function ( ) {
31- return "A" ;
32- }
31+ return 'A' ;
32+ } ;
3333
3434 function DecoratorClass ( decorated ) {
3535 this . called = true ;
36- } ;
36+ }
3737
3838 DecoratorClass . prototype . other = function ( ) {
39- return "B" ;
40- }
39+ return 'B' ;
40+ } ;
4141
4242 var DecoratedClass = Utils . Decorate ( BaseClass , DecoratorClass ) ;
4343
@@ -47,40 +47,40 @@ test("overridden - constructor", function (assert) {
4747 assert . ok ( ! inst . inherited ) ;
4848} ) ;
4949
50- test ( " not overridden - method" , function ( assert ) {
51- function BaseClass ( ) { } ;
50+ test ( ' not overridden - method' , function ( assert ) {
51+ function BaseClass ( ) { }
5252
5353 BaseClass . prototype . hello = function ( ) {
54- return "A" ;
55- }
54+ return 'A' ;
55+ } ;
5656
57- function DecoratorClass ( ) { } ;
57+ function DecoratorClass ( ) { }
5858
5959 DecoratorClass . prototype . other = function ( ) {
60- return "B" ;
61- }
60+ return 'B' ;
61+ } ;
6262
6363 var DecoratedClass = Utils . Decorate ( BaseClass , DecoratorClass ) ;
6464
6565 var inst = new DecoratedClass ( ) ;
6666
67- assert . strictEqual ( inst . hello ( ) , "A" ) ;
67+ assert . strictEqual ( inst . hello ( ) , 'A' ) ;
6868} ) ;
6969
70- test ( " not overridden - constructor" , function ( assert ) {
70+ test ( ' not overridden - constructor' , function ( assert ) {
7171 function BaseClass ( ) {
7272 this . called = true ;
73- } ;
73+ }
7474
7575 BaseClass . prototype . hello = function ( ) {
76- return "A" ;
77- }
76+ return 'A' ;
77+ } ;
7878
79- function DecoratorClass ( ) { } ;
79+ function DecoratorClass ( ) { }
8080
8181 DecoratorClass . prototype . other = function ( ) {
82- return "B" ;
83- }
82+ return 'B' ;
83+ } ;
8484
8585 var DecoratedClass = Utils . Decorate ( BaseClass , DecoratorClass ) ;
8686
@@ -89,44 +89,44 @@ test("not overridden - constructor", function (assert) {
8989 assert . ok ( inst . called ) ;
9090} ) ;
9191
92- test ( " inherited - method" , function ( assert ) {
93- function BaseClass ( ) { } ;
92+ test ( ' inherited - method' , function ( assert ) {
93+ function BaseClass ( ) { }
9494
9595 BaseClass . prototype . hello = function ( ) {
96- return "A" ;
97- }
96+ return 'A' ;
97+ } ;
9898
99- function DecoratorClass ( decorated ) { } ;
99+ function DecoratorClass ( decorated ) { }
100100
101101 DecoratorClass . prototype . hello = function ( decorated ) {
102- return "B" + decorated . call ( this ) + "C" ;
103- }
102+ return 'B' + decorated . call ( this ) + 'C' ;
103+ } ;
104104
105105 var DecoratedClass = Utils . Decorate ( BaseClass , DecoratorClass ) ;
106106
107107 var inst = new DecoratedClass ( ) ;
108108
109- assert . strictEqual ( inst . hello ( ) , " BAC" ) ;
109+ assert . strictEqual ( inst . hello ( ) , ' BAC' ) ;
110110} ) ;
111111
112- test ( " inherited - constructor" , function ( assert ) {
112+ test ( ' inherited - constructor' , function ( assert ) {
113113 function BaseClass ( ) {
114114 this . inherited = true ;
115- } ;
115+ }
116116
117117 BaseClass . prototype . hello = function ( ) {
118- return "A" ;
119- }
118+ return 'A' ;
119+ } ;
120120
121121 function DecoratorClass ( decorated ) {
122122 this . called = true ;
123123
124124 decorated . call ( this ) ;
125- } ;
125+ }
126126
127127 DecoratorClass . prototype . other = function ( ) {
128- return "B" ;
129- }
128+ return 'B' ;
129+ } ;
130130
131131 var DecoratedClass = Utils . Decorate ( BaseClass , DecoratorClass ) ;
132132
0 commit comments