Skip to content

Commit 73effbb

Browse files
committed
Merge pull request #636 from segmentio/fix/routeto
Route.to style fixes
2 parents cd4359a + 5634355 commit 73effbb

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

lib/route/index.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ var Route = module.exports = integration('Route')
1414
/**
1515
* Initialize Route.
1616
*
17-
* @param {Facade} page
17+
* @api public
1818
*/
1919

20-
Route.prototype.initialize = function(page){
20+
Route.prototype.initialize = function(){
2121
window._rq = window._rq || [];
2222
window._route = window._route || [];
2323
window._route.methods = ['identify', 'track', 'trackById'];
@@ -39,6 +39,7 @@ Route.prototype.initialize = function(page){
3939
/**
4040
* Has the Route library been loaded yet?
4141
*
42+
* @api private
4243
* @return {Boolean}
4344
*/
4445

@@ -49,7 +50,8 @@ Route.prototype.loaded = function(){
4950
/**
5051
* Identify a user.
5152
*
52-
* @param {Facade} identify
53+
* @api public
54+
* @param {Track} identify
5355
*/
5456

5557
Route.prototype.identify = function(identify){
@@ -59,7 +61,8 @@ Route.prototype.identify = function(identify){
5961
/**
6062
* Track an event.
6163
*
62-
* @param {Facade} track
64+
* @api public
65+
* @param {Track} track
6366
*/
6467

6568
Route.prototype.track = function(track){

lib/route/test.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11

22
var Analytics = require('analytics.js').constructor;
33
var integration = require('analytics.js-integration');
4-
var plugin = require('./');
54
var sandbox = require('clear-env');
65
var tester = require('analytics.js-integration-tester');
6+
var Route = require('./');
77

88
describe('Route', function(){
9-
var Route = plugin;
10-
var route;
119
var analytics;
10+
var route;
1211
var options = {
1312
organizationId: '553e9be7ab3e3a16d07a2432'
1413
};
1514

1615
beforeEach(function(){
17-
analytics = new Analytics;
16+
analytics = new Analytics();
1817
route = new Route(options);
19-
analytics.use(plugin);
18+
analytics.use(Route);
2019
analytics.use(tester);
2120
analytics.add(route);
2221
});
2322

2423
afterEach(function(){
2524
analytics.restore();
2625
analytics.reset();
27-
route.reset();
2826
sandbox();
27+
route.reset();
2928
});
3029

3130
it('should have the right settings', function(){

test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ mocha.setup({
2020

2121
describe('integrations', function(){
2222
it('should export our integrations', function(){
23-
assert.equal(84, object.length(Integrations));
23+
assert.equal(85, object.length(Integrations));
2424
});
2525
});
2626

0 commit comments

Comments
 (0)