You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Angular 1.6 alters the way uncaught promises are handled - errors cause promise rejection rather than outright exceptions to be thrown. Update existing exception tests to use the exceptionHandler service instead of `.throws()`
Closesangular-ui#1877
it('should throw when repeat attribute has incorrect format ',function(){
1134
-
expect(function(){
1135
-
compileTemplate(
1136
-
'<ui-select ng-model="selection.selected"> \
1137
-
<ui-select-match></ui-select-match> \
1138
-
<ui-select-choices repeat="incorrect format people"></ui-select-choices> \
1139
-
</ui-select>'
1140
-
);
1141
-
}).toThrow(newError('[ui.select:iexp] Expected expression in form of \'_item_ in _collection_[ track by _id_]\' but got \'incorrect format people\'.'));
1137
+
compileTemplate(
1138
+
'<ui-select ng-model="selection.selected"> \
1139
+
<ui-select-match></ui-select-match> \
1140
+
<ui-select-choices repeat="incorrect format people"></ui-select-choices> \
varexpectedError=newError('[ui.select:iexp] Expected expression in form of \'_item_ in _collection_[ track by _id_]\' but got \'incorrect format people\'.');
1145
+
expect(lastError).toEqual(expectedError);
1142
1146
});
1143
1147
1144
1148
it('should throw when no ui-select-match found',function(){
1145
-
expect(function(){
1146
-
compileTemplate(
1147
-
'<ui-select ng-model="selection.selected"> \
1148
-
<ui-select-choices repeat="item in items"></ui-select-choices> \
1149
-
</ui-select>'
1150
-
);
1151
-
}).toThrow(newError('[ui.select:transcluded] Expected 1 .ui-select-match but got \'0\'.'));
1149
+
compileTemplate(
1150
+
'<ui-select ng-model="selection.selected"> \
1151
+
<ui-select-choices repeat="item in items"></ui-select-choices> \
0 commit comments