@@ -29,21 +29,21 @@ describe('AppDataAttributeHandler', () => {
2929 console . log . restore ( ) ;
3030 } ) ;
3131
32- it ( 'should throw error when base element not specified' , ( ) => {
32+ it ( 'throws error when base element not specified' , ( ) => {
3333 assert . throws ( ( ) => {
3434 new AppDataAttributeHandler ( ) . handle ( ) ;
3535 } , Error ) ;
3636 } ) ;
3737
38- it ( 'should throw error when base element not valid' , ( ) => {
38+ it ( 'throws error when base element not valid' , ( ) => {
3939 assert . throws ( ( ) => {
4040 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
4141 appDataAttributeHandler . setBaseElement ( { } ) ;
4242 appDataAttributeHandler . handle ( ) ;
4343 } , Error ) ;
4444 } ) ;
4545
46- it ( 'should throw error when already handled' , ( ) => {
46+ it ( 'throws error when already handled' , ( ) => {
4747 assert . throws ( ( ) => {
4848 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
4949 appDataAttributeHandler . setBaseElement ( globals . document . body ) ;
@@ -52,7 +52,7 @@ describe('AppDataAttributeHandler', () => {
5252 } , Error ) ;
5353 } ) ;
5454
55- it ( 'should not throw error when base element specified' , ( ) => {
55+ it ( 'does not throw error when base element specified' , ( ) => {
5656 assert . doesNotThrow ( ( ) => {
5757 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
5858 appDataAttributeHandler . setBaseElement ( globals . document . body ) ;
@@ -61,30 +61,30 @@ describe('AppDataAttributeHandler', () => {
6161 } ) ;
6262 } ) ;
6363
64- it ( 'should dispose internal app when disposed' , ( ) => {
64+ it ( 'disposes internal app when disposed' , ( ) => {
6565 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
6666 appDataAttributeHandler . setBaseElement ( globals . document . body ) ;
6767 appDataAttributeHandler . handle ( ) ;
6868 appDataAttributeHandler . dispose ( ) ;
6969 assert . ok ( appDataAttributeHandler . getApp ( ) . isDisposed ( ) ) ;
7070 } ) ;
7171
72- it ( 'should dispose when not handled' , ( ) => {
72+ it ( 'disposes when not handled' , ( ) => {
7373 assert . doesNotThrow ( ( ) => {
7474 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
7575 appDataAttributeHandler . dispose ( ) ;
7676 } ) ;
7777 } ) ;
7878
79- it ( 'should get app' , ( ) => {
79+ it ( 'gets app' , ( ) => {
8080 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
8181 appDataAttributeHandler . setBaseElement ( globals . document . body ) ;
8282 appDataAttributeHandler . handle ( ) ;
8383 assert . ok ( appDataAttributeHandler . getApp ( ) ) ;
8484 appDataAttributeHandler . dispose ( ) ;
8585 } ) ;
8686
87- it ( 'should get base element' , ( ) => {
87+ it ( 'gets base element' , ( ) => {
8888 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
8989 appDataAttributeHandler . setBaseElement ( globals . document . body ) ;
9090 assert . strictEqual (
@@ -93,7 +93,7 @@ describe('AppDataAttributeHandler', () => {
9393 ) ;
9494 } ) ;
9595
96- it ( 'should add app surfaces from document' , ( ) => {
96+ it ( 'adds app surfaces from document' , ( ) => {
9797 enterDocumentSurfaceElement ( 'surfaceId' ) ;
9898 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
9999 appDataAttributeHandler . setBaseElement ( globals . document . body ) ;
@@ -103,7 +103,7 @@ describe('AppDataAttributeHandler', () => {
103103 exitDocumentSurfaceElement ( 'surfaceId' ) ;
104104 } ) ;
105105
106- it ( 'should adds random id to body without id when used as app surface' , ( ) => {
106+ it ( 'adds random id to body without id when used as app surface' , ( ) => {
107107 globals . document . body . setAttribute ( 'data-senna-surface' , '' ) ;
108108 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
109109 appDataAttributeHandler . setBaseElement ( globals . document . body ) ;
@@ -113,7 +113,7 @@ describe('AppDataAttributeHandler', () => {
113113 globals . document . body . removeAttribute ( 'data-senna-surface' ) ;
114114 } ) ;
115115
116- it ( 'should throw error when adding app surfaces from document missing id' , ( ) => {
116+ it ( 'throws error when adding app surfaces from document missing id' , ( ) => {
117117 enterDocumentSurfaceElementMissingId ( 'surfaceId' ) ;
118118 assert . throws ( ( ) => {
119119 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
@@ -123,15 +123,15 @@ describe('AppDataAttributeHandler', () => {
123123 exitDocumentSurfaceElementMissingId ( 'surfaceId' ) ;
124124 } ) ;
125125
126- it ( 'should add default route if not found in document' , ( ) => {
126+ it ( 'adds default route if not found in document' , ( ) => {
127127 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
128128 appDataAttributeHandler . setBaseElement ( globals . document . body ) ;
129129 appDataAttributeHandler . handle ( ) ;
130130 assert . ok ( appDataAttributeHandler . getApp ( ) . hasRoutes ( ) ) ;
131131 appDataAttributeHandler . dispose ( ) ;
132132 } ) ;
133133
134- it ( 'should add routes from document' , ( ) => {
134+ it ( 'adds routes from document' , ( ) => {
135135 enterDocumentRouteElement ( '/path1' ) ;
136136 enterDocumentRouteElement ( '/path2' ) ;
137137 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
@@ -143,7 +143,7 @@ describe('AppDataAttributeHandler', () => {
143143 exitDocumentRouteElement ( '/path2' ) ;
144144 } ) ;
145145
146- it ( 'should add routes from document with regex paths' , ( ) => {
146+ it ( 'adds routes from document with regex paths' , ( ) => {
147147 enterDocumentRouteElement ( 'regex:[a-z]' ) ;
148148 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
149149 appDataAttributeHandler . setBaseElement ( globals . document . body ) ;
@@ -156,7 +156,7 @@ describe('AppDataAttributeHandler', () => {
156156 exitDocumentRouteElement ( 'regex:[a-z]' ) ;
157157 } ) ;
158158
159- it ( 'should throw error when adding routes from document with missing screen type' , ( ) => {
159+ it ( 'throws error when adding routes from document with missing screen type' , ( ) => {
160160 enterDocumentRouteElementMissingScreenType ( '/path' ) ;
161161 assert . throws ( ( ) => {
162162 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
@@ -166,7 +166,7 @@ describe('AppDataAttributeHandler', () => {
166166 exitDocumentRouteElement ( '/path' ) ;
167167 } ) ;
168168
169- it ( 'should throw error when adding routes from document with missing path' , ( ) => {
169+ it ( 'throws error when adding routes from document with missing path' , ( ) => {
170170 enterDocumentRouteElementMissingPath ( ) ;
171171 assert . throws ( ( ) => {
172172 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
@@ -176,7 +176,7 @@ describe('AppDataAttributeHandler', () => {
176176 exitDocumentRouteElementMissingPath ( ) ;
177177 } ) ;
178178
179- it ( 'should set base path from data attribute' , ( ) => {
179+ it ( 'sets base path from data attribute' , ( ) => {
180180 globals . document . body . setAttribute ( 'data-senna-base-path' , '/base' ) ;
181181 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
182182 appDataAttributeHandler . setBaseElement ( globals . document . body ) ;
@@ -189,7 +189,7 @@ describe('AppDataAttributeHandler', () => {
189189 globals . document . body . removeAttribute ( 'data-senna-base-path' ) ;
190190 } ) ;
191191
192- it ( 'should set link selector from data attribute' , ( ) => {
192+ it ( 'sets link selector from data attribute' , ( ) => {
193193 globals . document . body . setAttribute ( 'data-senna-link-selector' , 'a' ) ;
194194 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
195195 appDataAttributeHandler . setBaseElement ( globals . document . body ) ;
@@ -202,7 +202,7 @@ describe('AppDataAttributeHandler', () => {
202202 globals . document . body . removeAttribute ( 'data-senna-link-selector' ) ;
203203 } ) ;
204204
205- it ( 'should set loading css class from data attribute' , ( ) => {
205+ it ( 'sets loading css class from data attribute' , ( ) => {
206206 globals . document . body . setAttribute (
207207 'data-senna-loading-css-class' ,
208208 'loading'
@@ -218,7 +218,7 @@ describe('AppDataAttributeHandler', () => {
218218 globals . document . body . removeAttribute ( 'data-senna-loading-css-class' ) ;
219219 } ) ;
220220
221- it ( 'should set update scroll position to false from data attribute' , ( ) => {
221+ it ( 'sets update scroll position to false from data attribute' , ( ) => {
222222 globals . document . body . setAttribute (
223223 'data-senna-update-scroll-position' ,
224224 'false'
@@ -236,7 +236,7 @@ describe('AppDataAttributeHandler', () => {
236236 ) ;
237237 } ) ;
238238
239- it ( 'should set update scroll position to true from data attribute' , ( ) => {
239+ it ( 'sets update scroll position to true from data attribute' , ( ) => {
240240 globals . document . body . setAttribute (
241241 'data-senna-update-scroll-position' ,
242242 'true'
@@ -254,7 +254,7 @@ describe('AppDataAttributeHandler', () => {
254254 ) ;
255255 } ) ;
256256
257- it ( 'should dispatch app from data attribute' , ( ) => {
257+ it ( 'dispatches app from data attribute' , ( ) => {
258258 globals . document . body . setAttribute ( 'data-senna-dispatch' , '' ) ;
259259 var appDataAttributeHandler = new AppDataAttributeHandler ( ) ;
260260 appDataAttributeHandler . setBaseElement ( globals . document . body ) ;
0 commit comments