We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e5bfd1 commit a046f56Copy full SHA for a046f56
test/stateSpec.js
@@ -1900,3 +1900,18 @@ describe('.onInvalid()', function() {
1900
expect($state.current.name).toBe("second")
1901
}));
1902
});
1903
+
1904
+describe('$stateParams', function () {
1905
+ beforeEach(module('ui.router.state'));
1906
1907
+ it('should start empty', inject(function ($stateParams) {
1908
+ expect($stateParams.foo).toBeUndefined();
1909
+ }));
1910
+ it('should allow setting values on it', inject(function ($stateParams) {
1911
+ $stateParams.foo = 'bar';
1912
+ expect($stateParams.foo).toBeDefined();
1913
1914
+ it('should be cleared between tests', inject(function ($stateParams) {
1915
1916
1917
+});
0 commit comments