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 add.spec.js #175

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
18 changes: 9 additions & 9 deletions dev/tests/spec/add.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 @@ -23,7 +23,7 @@ describe('crossroads.addRoute()', function(){

it('should return a route and attach it to crossroads', function(){

var s = crossroads.addRoute('/{foo}');
let s = crossroads.addRoute('/{foo}');

expect( s ).toBeDefined();
expect( s.rules ).toBeUndefined();
Expand All @@ -34,7 +34,7 @@ describe('crossroads.addRoute()', function(){

it('should add listener to matched if provided', function(){

var s = crossroads.addRoute('/{foo}', function(){
let s = crossroads.addRoute('/{foo}', function(){
expect().toBe('shouldnt be called');
});

Expand All @@ -47,7 +47,7 @@ describe('crossroads.addRoute()', function(){

it('should accept RegExp', function(){

var s = crossroads.addRoute(/^foo\/([a-z]+)$/, function(){
let s = crossroads.addRoute(/^foo\/([a-z]+)$/, function(){
expect().toBe('shouldnt be called');
});

Expand All @@ -60,11 +60,11 @@ describe('crossroads.addRoute()', function(){

it('should increment num routes', function(){

var s1 = crossroads.addRoute(/^foo\/([a-z]+)$/, function(){
let s1 = crossroads.addRoute(/^foo\/([a-z]+)$/, function(){
expect().toBe('shouldnt be called');
});

var s2 = crossroads.addRoute('/{foo}', function(){
let s2 = crossroads.addRoute('/{foo}', function(){
expect().toBe('shouldnt be called');
});

Expand All @@ -80,9 +80,9 @@ describe('crossroads.addRoute()', function(){

it('should work on multiple instances', function(){

var s1 = crossroads.addRoute('/bar');
var cr = crossroads.create();
var s2 = cr.addRoute('/ipsum');
let s1 = crossroads.addRoute('/bar');
let cr = crossroads.create();
let s2 = cr.addRoute('/ipsum');

expect( s1 ).toBeDefined();
expect( s2 ).toBeDefined();
Expand Down