File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ var Route = module.exports = integration('Route')
14
14
/**
15
15
* Initialize Route.
16
16
*
17
- * @param { Facade } page
17
+ * @api public
18
18
*/
19
19
20
- Route . prototype . initialize = function ( page ) {
20
+ Route . prototype . initialize = function ( ) {
21
21
window . _rq = window . _rq || [ ] ;
22
22
window . _route = window . _route || [ ] ;
23
23
window . _route . methods = [ 'identify' , 'track' , 'trackById' ] ;
@@ -39,6 +39,7 @@ Route.prototype.initialize = function(page){
39
39
/**
40
40
* Has the Route library been loaded yet?
41
41
*
42
+ * @api private
42
43
* @return {Boolean }
43
44
*/
44
45
@@ -49,7 +50,8 @@ Route.prototype.loaded = function(){
49
50
/**
50
51
* Identify a user.
51
52
*
52
- * @param {Facade } identify
53
+ * @api public
54
+ * @param {Track } identify
53
55
*/
54
56
55
57
Route . prototype . identify = function ( identify ) {
@@ -59,7 +61,8 @@ Route.prototype.identify = function(identify){
59
61
/**
60
62
* Track an event.
61
63
*
62
- * @param {Facade } track
64
+ * @api public
65
+ * @param {Track } track
63
66
*/
64
67
65
68
Route . prototype . track = function ( track ) {
Original file line number Diff line number Diff line change 1
1
2
2
var Analytics = require ( 'analytics.js' ) . constructor ;
3
3
var integration = require ( 'analytics.js-integration' ) ;
4
- var plugin = require ( './' ) ;
5
4
var sandbox = require ( 'clear-env' ) ;
6
5
var tester = require ( 'analytics.js-integration-tester' ) ;
6
+ var Route = require ( './' ) ;
7
7
8
8
describe ( 'Route' , function ( ) {
9
- var Route = plugin ;
10
- var route ;
11
9
var analytics ;
10
+ var route ;
12
11
var options = {
13
12
organizationId : '553e9be7ab3e3a16d07a2432'
14
13
} ;
15
14
16
15
beforeEach ( function ( ) {
17
- analytics = new Analytics ;
16
+ analytics = new Analytics ( ) ;
18
17
route = new Route ( options ) ;
19
- analytics . use ( plugin ) ;
18
+ analytics . use ( Route ) ;
20
19
analytics . use ( tester ) ;
21
20
analytics . add ( route ) ;
22
21
} ) ;
23
22
24
23
afterEach ( function ( ) {
25
24
analytics . restore ( ) ;
26
25
analytics . reset ( ) ;
27
- route . reset ( ) ;
28
26
sandbox ( ) ;
27
+ route . reset ( ) ;
29
28
} ) ;
30
29
31
30
it ( 'should have the right settings' , function ( ) {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ mocha.setup({
20
20
21
21
describe ( 'integrations' , function ( ) {
22
22
it ( 'should export our integrations' , function ( ) {
23
- assert . equal ( 84 , object . length ( Integrations ) ) ;
23
+ assert . equal ( 85 , object . length ( Integrations ) ) ;
24
24
} ) ;
25
25
} ) ;
26
26
You can’t perform that action at this time.
0 commit comments