Skip to content

Commit 4fc388b

Browse files
committed
Removing duplicate tests, cleaning up test naming.
1 parent 9ff17ce commit 4fc388b

File tree

1 file changed

+4
-38
lines changed

1 file changed

+4
-38
lines changed

test/stateSpec.js

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -392,40 +392,6 @@ describe('state', function () {
392392
}));
393393
});
394394

395-
describe(' "data" property inheritance/override', function () {
396-
it('"data" property should stay immutable for if state doesn\'t have parent', inject(function ($state) {
397-
initStateTo(H);
398-
expect($state.current.name).toEqual('H');
399-
expect($state.current.data.propA).toEqual(H.data.propA);
400-
expect($state.current.data.propB).toEqual(H.data.propB);
401-
}));
402-
403-
it('"data" property should be inherited from parent if state doesn\'t define it', inject(function ($state) {
404-
initStateTo(HH);
405-
expect($state.current.name).toEqual('HH');
406-
expect($state.current.data.propA).toEqual(H.data.propA);
407-
expect($state.current.data.propB).toEqual(H.data.propB);
408-
}));
409-
410-
it('"data" property should be overridden/extended if state defines it', inject(function ($state) {
411-
initStateTo(HHH);
412-
expect($state.current.name).toEqual('HHH');
413-
expect($state.current.data.propA).toEqual(HHH.data.propA);
414-
expect($state.current.data.propB).toEqual(H.data.propB);
415-
expect($state.current.data.propB).toEqual(HH.data.propB);
416-
expect($state.current.data.propC).toEqual(HHH.data.propC);
417-
}));
418-
});
419-
420-
describe('html5Mode compatibility', function() {
421-
422-
it('should generate non-hashbang URLs in HTML5 mode', inject(function ($state) {
423-
expect($state.href("about.person", { person: "bob" })).toEqual("#/about/bob");
424-
locationProvider.html5Mode(true);
425-
expect($state.href("about.person", { person: "bob" })).toEqual("/about/bob");
426-
}));
427-
});
428-
429395
describe('url handling', function () {
430396

431397
it('should transition to the same state with different parameters', inject(function ($state, $rootScope, $location) {
@@ -454,22 +420,22 @@ describe('state', function () {
454420
}));
455421
});
456422

457-
describe(' "data" property inheritance/override', function () {
458-
it('"data" property should stay immutable for if state doesn\'t have parent', inject(function ($state) {
423+
describe('"data" property inheritance/override', function () {
424+
it('should stay immutable for if state doesn\'t have parent', inject(function ($state) {
459425
initStateTo(H);
460426
expect($state.current.name).toEqual('H');
461427
expect($state.current.data.propA).toEqual(H.data.propA);
462428
expect($state.current.data.propB).toEqual(H.data.propB);
463429
}));
464430

465-
it('"data" property should be inherited from parent if state doesn\'t define it', inject(function ($state) {
431+
it('should be inherited from parent if state doesn\'t define it', inject(function ($state) {
466432
initStateTo(HH);
467433
expect($state.current.name).toEqual('HH');
468434
expect($state.current.data.propA).toEqual(H.data.propA);
469435
expect($state.current.data.propB).toEqual(H.data.propB);
470436
}));
471437

472-
it('"data" property should be overridden/extended if state defines it', inject(function ($state) {
438+
it('should be overridden/extended if state defines it', inject(function ($state) {
473439
initStateTo(HHH);
474440
expect($state.current.name).toEqual('HHH');
475441
expect($state.current.data.propA).toEqual(HHH.data.propA);

0 commit comments

Comments
 (0)