can-route
Advanced tools
Comparing version 3.3.1 to 3.3.2
{ | ||
"name": "can-route", | ||
"version": "3.3.1", | ||
"version": "3.3.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "homepage": "", |
@@ -532,3 +532,3 @@ /* jshint asi:true */ | ||
iCanRoute.serializedCompute.bind('change', function(){ | ||
equal(iCanRoute.attr('personId'), '3', 'personId'); | ||
@@ -1102,3 +1102,3 @@ equal(iCanRoute.attr('foo'), undefined, 'unexpected value'); | ||
var AppState = DefineMap.extend({seal: false},{"*": "stringOrObservable"}); | ||
var AppState = DefineMap.extend({seal: false},{"*": "stringOrObservable", page: "string", section: "string"}); | ||
var appState = new AppState({}); | ||
@@ -1114,27 +1114,29 @@ | ||
var matchedCount = 0; | ||
canRoute.on('__url', function() { | ||
var onMatchCall = { | ||
1: function section_a() { | ||
canRoute.data.section = 'a'; | ||
}, | ||
2: function section_b() { | ||
canRoute.data.section = 'b'; | ||
}, | ||
3: function(){ | ||
// 1st call is going from undefined to empty string | ||
equal(matchedCount, 3, 'calls __url event every time a property is changed'); | ||
canRoute.off('__url', updateMatchedCount); | ||
mockRoute.stop(); | ||
QUnit.start(); | ||
} | ||
}; | ||
var updateMatchedCount = function() { | ||
// any time a route property is changed, not just the matched route | ||
matchedCount++; | ||
}); | ||
onMatchCall[matchedCount](); | ||
}; | ||
canRoute.on('__url', updateMatchedCount); | ||
setTimeout(function() { | ||
setTimeout(function page_two() { | ||
canRoute.data.page = 'two'; | ||
}, 30); | ||
}, 50); | ||
setTimeout(function() { | ||
canRoute.data.section = 'a'; | ||
}, 60); | ||
setTimeout(function() { | ||
canRoute.data.section = 'b'; | ||
}, 90); | ||
setTimeout(function(){ | ||
// 1st call is going from undefined to empty string | ||
equal(matchedCount, 4, 'calls __url event every time a property is changed'); | ||
mockRoute.stop(); | ||
QUnit.start(); | ||
}, 200); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
102936
2869
0