-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #397 from mapzen/hanb/improve-test
added tests to each case of component initialization
- Loading branch information
Showing
3 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
describe('Routing Test', function () { | ||
var el; | ||
var map; | ||
|
||
before(function (done) { | ||
L.Mapzen.apiKey = 'mapzen-cstHyBQ'; | ||
done(); | ||
}) | ||
|
||
describe('Basic Routing Check', function () { | ||
|
||
it('checks routing component is initialized.', function (done) { | ||
var routingControl = L.Mapzen.routing.control({ | ||
router: L.Mapzen.routing.router({costing: 'bicycle'}) | ||
}); | ||
done(); | ||
}); | ||
|
||
it('checks routing component with both apikey and option is initialized', function (done) { | ||
var routingControl = L.Mapzen.routing.control({ | ||
router: L.Mapzen.routing.router('mapzen-cstHyBQ', {costing: 'bicycle'}) | ||
}); | ||
done(); | ||
}); | ||
|
||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
describe('Search Test', function () { | ||
var el; | ||
var map; | ||
|
||
before(function (done) { | ||
L.Mapzen.apiKey = 'mapzen-cstHyBQ'; | ||
done(); | ||
}) | ||
|
||
describe('Basic Geocoder Check', function () { | ||
it('checks geocoder is initialized', function (done) { | ||
var geocoder = L.Mapzen.geocoder(); | ||
done(); | ||
}); | ||
|
||
it('checks geocoder with api key is initialized', function (done) { | ||
var geocoder = L.Mapzen.geocoder('mapzen-cstHyBQ'); | ||
done(); | ||
}); | ||
|
||
it('checks geocoder with option is initialized', function (done) { | ||
var geocoder = L.Mapzen.geocoder({ | ||
autocomplete: false, | ||
attribution: 'test attribution' | ||
}); | ||
done(); | ||
}); | ||
|
||
it('checks geocoder with both api key and option is initialized', function (done) { | ||
var geocoder = L.Mapzen.geocoder('mapzen-cstHyBQ', { | ||
autocomplete: false | ||
}); | ||
done(); | ||
}); | ||
}) | ||
}); |