Skip to content

Commit 817d19d

Browse files
committed
fix(filterFilter) : test case for "issue when expectedVal is null"
add test case for new fix
1 parent 3a7af5c commit 817d19d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/ng/filter/filterSpec.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -438,20 +438,20 @@ describe('Filter: filter', function() {
438438
expect(filter(items, f).length).toBe(3);
439439

440440
f = { people:null };
441-
expect(filter(items, f).length).toBe(3);
442-
443-
//should throw an error in 1.3.12
444-
f = { people:{ name:'john' }};
445441
expect(filter(items, f).length).toBe(1);
446442

447-
//should throw an error in 1.3.12
448-
f = { people:{ name:'j' }};
443+
f = { people: {}};
449444
expect(filter(items, f).length).toBe(2);
450445

451-
//should throw an error in 1.3.12
452446
f = { people:{ name: '' }};
453447
expect(filter(items, f).length).toBe(2);
454448

449+
f = { people:{ name:'john' }};
450+
expect(filter(items, f).length).toBe(1);
451+
452+
f = { people:{ name:'j' }};
453+
expect(filter(items, f).length).toBe(2);
454+
455455
});
456456

457457
describe('should support comparator', function() {

0 commit comments

Comments
 (0)