Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update create.spec.js #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions dev/tests/spec/create.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*jshint onevar:false */

//for node
var crossroads = crossroads || require('../../../dist/crossroads');
let crossroads = crossroads || require('../../../dist/crossroads');
//end node


Expand All @@ -16,8 +16,8 @@ describe('crossroads.create()', function(){
describe('new Router instance', function(){

it('should work in new instances', function(){
var t1;
var cr = crossroads.create();
let t1;
let cr = crossroads.create();

cr.addRoute('/{foo}', function(foo){
t1 = foo;
Expand All @@ -29,8 +29,8 @@ describe('crossroads.create()', function(){


it('shouldn\'t affect static instance', function(){
var t1;
var cr = crossroads.create();
let t1;
let cr = crossroads.create();

cr.addRoute('/{foo}', function(foo){
t1 = foo;
Expand All @@ -45,8 +45,8 @@ describe('crossroads.create()', function(){


it('shouldn\'t be affected by static instance', function(){
var t1;
var cr = crossroads.create();
let t1;
let cr = crossroads.create();

crossroads.addRoute('/{foo}', function(foo){
t1 = foo;
Expand All @@ -61,8 +61,8 @@ describe('crossroads.create()', function(){


it('should allow a different lexer per router', function () {
var cr = crossroads.create();
var count = 0;
let cr = crossroads.create();
let count = 0;
cr.patternLexer = {
getParamIds : function(){
return ['a','b'];
Expand All @@ -77,8 +77,8 @@ describe('crossroads.create()', function(){
return (/foo-bar/);
}
};
var vals = [];
var inc = function(a, b){
let vals = [];
let inc = function(a, b){
vals[0] = a;
vals[1] = b;
count++;
Expand Down