Skip to content

Commit 4ac2edb

Browse files
committed
Sort to ensure ordering.
1 parent 987b07e commit 4ac2edb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/stateSpec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ describe('state', function () {
395395
}));
396396

397397
it("should return all of the state's config", inject(function ($state) {
398-
var list = $state.getAll();
398+
var list = $state.getAll().sort(function(a, b) { return (a.name > b.name) - (b.name > a.name); });
399399
var names = [
400400
'', // implicit root state
401401
'A',
@@ -407,14 +407,14 @@ describe('state', function () {
407407
'H',
408408
'HH',
409409
'HHH',
410-
'home',
411-
'home.item',
412410
'about',
413411
'about.person',
414412
'about.person.item',
415413
'about.sidebar',
416414
'about.sidebar.item',
417415
'first',
416+
'home',
417+
'home.item',
418418
'second'
419419
];
420420
expect(list.map(function(state) { return state.name; })).toEqual(names);

0 commit comments

Comments
 (0)