Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zvone187 authored Jul 1, 2023
1 parent 5786b7e commit b53b1f5
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,6 @@ npx jest ./pythagora_tests/
expect(size({ 'a': 1, 'b': 2, 'length': 9 })).toBe(3); // test returns 9
});
```

2. `matches` fails when a `Symbol` is used as a key
```javascript
// { [symbolA]: 1, [symbolB]: 2 } should be different from { [symbolA]: 1, [symbolB]: 5 }
// so expected result is false but lodash returns true
test('should fail for non-matching objects with symbols', () => {
const symbolA = Symbol('a');
const symbolB = Symbol('b');
const matchesFunc = matches({ [symbolA]: 1, [symbolB]: 2 });
expect(matchesFunc({ [symbolA]: 1, [symbolB]: 5 })).toBeFalsy(); // test returns true
});
```

3. `mean` doesn't work when strings are passed into it:
```javascript
// Lodash docs say that _.mean "Computes the mean of the values in array."
// it doesn't specify that you should send an array of numbers
// and if you send strings, it doesn't throw an error either
// rather, it returns a number but a wrong one
test('test mean with values as strings', () => {
expect(mean(["5", "6", "7"])).toEqual(6); // test returns 189
});
```
---

### Bugs that are in the `master` branch
Expand Down

0 comments on commit b53b1f5

Please sign in to comment.