Add editorconfig, resolve differences

This includes newlines, tabs, among other things.
This commit is contained in:
impinball 2016-06-18 02:59:42 -04:00
parent 80d0a69dab
commit b4fb21475c
90 changed files with 1707 additions and 1701 deletions

View file

@ -8,7 +8,7 @@ o.spec("Router.getPath", function() {
void ["#", "?", "", "#!", "?!", '/foo'].forEach(function(prefix) {
o.spec("using prefix `" + prefix + "`", function() {
var $window, router, onRouteChange, onFail
o.beforeEach(function() {
$window = pushStateMock()
router = new Router($window)
@ -16,31 +16,31 @@ o.spec("Router.getPath", function() {
onRouteChange = o.spy()
onFail = o.spy()
})
o("gets route", function() {
$window.location.href = prefix + "/test"
router.defineRoutes({"/test": {data: 1}}, onRouteChange, onFail)
o(router.getPath()).equals("/test")
})
o("gets route w/ params", function() {
$window.location.href = prefix + "/other/x/y/z?c=d#e=f"
router.defineRoutes({"/test": {data: 1}, "/other/:a/:b...": {data: 2}}, onRouteChange, onFail)
o(router.getPath()).equals("/other/x/y/z?c=d#e=f")
})
o("gets route w/ escaped unicode", function() {
$window.location.href = prefix + "/%C3%B6?%C3%B6=%C3%B6#%C3%B6=%C3%B6"
router.defineRoutes({"/test": {data: 1}, "/ö/:a/:b...": {data: 2}}, onRouteChange, onFail)
o(router.getPath()).equals("/ö?ö=ö#ö=ö")
})
o("gets route w/ unicode", function() {
$window.location.href = prefix + "/ö?ö=ö#ö=ö"
router.defineRoutes({"/test": {data: 1}, "/ö/:a/:b...": {data: 2}}, onRouteChange, onFail)
o(router.getPath()).equals("/ö?ö=ö#ö=ö")
})
})
})
})
})