@@ -212,13 +212,13 @@ describe('facets:acquisitionSource', () => {
212
212
213
213
describe ( 'facets:enterSource' , ( ) => {
214
214
it ( 'enterSource:bare' , ( ) => {
215
- assert . deepEqual ( facets . enterSource ( { events : [ { checkpoint : 'enter' , source : 'https://www.example.com' } ] } ) , [ 'https://www.example.com' ] ) ;
216
- assert . deepEqual ( facets . enterSource ( { events : [ { checkpoint : 'enter' , source : 'https://www.google.com' } ] } ) , [ 'https://www.google.com' , 'search:google' , 'search' , '*:google' ] ) ;
215
+ assert . deepEqual ( facets . enterSource ( { events : [ { checkpoint : 'enter' , source : 'https://www.example.com/ ' } ] } ) , [ 'https://www.example.com/ ' ] ) ;
216
+ assert . deepEqual ( facets . enterSource ( { events : [ { checkpoint : 'enter' , source : 'https://www.google.com/ ' } ] } ) , [ 'https://www.google.com/ ' , 'search:google' , 'search' , '*:google' ] ) ;
217
217
} ) ;
218
218
219
219
it ( 'enterSource:normalizeUrl' , ( ) => {
220
- assert . deepEqual ( facets . enterSource ( { events : [ { checkpoint : 'enter' , source : 'https://www.example.com/#' } ] } ) , [ 'https://www.example.com' ] ) ;
221
- assert . deepEqual ( facets . enterSource ( { events : [ { checkpoint : 'enter' , source : 'https://www.google.com/#' } ] } ) , [ 'https://www.google.com' , 'search:google' , 'search' , '*:google' ] ) ;
220
+ assert . deepEqual ( facets . enterSource ( { events : [ { checkpoint : 'enter' , source : 'https://www.example.com/#' } ] } ) , [ 'https://www.example.com/ ' ] ) ;
221
+ assert . deepEqual ( facets . enterSource ( { events : [ { checkpoint : 'enter' , source : 'https://www.google.com/#' } ] } ) , [ 'https://www.google.com/ ' , 'search:google' , 'search' , '*:google' ] ) ;
222
222
} ) ;
223
223
224
224
it ( 'enterSource:DataChunks' , ( ) => {
@@ -227,11 +227,12 @@ describe('facets:enterSource', () => {
227
227
d . addSeries ( 'pageViews' , pageViews ) ;
228
228
d . addFacet ( 'enterSource' , facets . enterSource ) ;
229
229
230
- assert . equal ( d . facets . enterSource . length , 46 ) ;
231
- assert . equal ( d . facets . enterSource [ 2 ] . value , 'search' ) ; // all search engines
232
- assert . equal ( d . facets . enterSource [ 3 ] . value , 'search:google' ) ; // google search
233
- assert . equal ( d . facets . enterSource [ 4 ] . value , '*:google' ) ; // all google properties
234
- assert . equal ( d . facets . enterSource [ 5 ] . value , 'https://www.google.com/' ) ; // that one specific google page
230
+ assert . equal ( d . facets . enterSource . length , 44 ) ;
231
+
232
+ assert . equal ( d . facets . enterSource [ 0 ] . value , 'search' ) ; // all search engines
233
+ assert . equal ( d . facets . enterSource [ 1 ] . value , 'search:google' ) ; // google search
234
+ assert . equal ( d . facets . enterSource [ 2 ] . value , '*:google' ) ; // all google properties
235
+ assert . equal ( d . facets . enterSource [ 3 ] . value , 'https://www.google.com/' ) ; // that one specific google page
235
236
} ) ;
236
237
} ) ;
237
238
0 commit comments