jest-extended icon indicating copy to clipboard operation
jest-extended copied to clipboard

Additional Jest matchers πŸƒπŸ’ͺ

Results 150 jest-extended issues
Sort by recently updated
recently updated
newest added

### What Modifies the three `toInclude{All,Any,Some}Members` matchers to also match on iterables. ### Why This is meant mostly for testing things that return `Set` and `Map` instances, but it’s generally...

### What added toBeAround() matcher ### Why Because it is very useful in many cases. ### Notes - ### Housekeeping - [X] Unit tests - [ ] Documentation is up...

**Bug** - `package` version: ``` "devDependencies": { "@babel/core": "^7.12.13", "@babel/eslint-parser": "^7.12.16", "@babel/node": "^7.12.16", "@babel/preset-env": "^7.12.13", "@types/jest": "^26.0.20", "@types/lodash": "^4.14.168", "axios": "^0.21.1", "babel-jest": "^26.6.3", "eslint": "^7.20.0", "eslint-config-airbnb-base": "^14.2.1", "eslint-config-prettier": "^7.2.0", "eslint-plugin-import":...

**Feature Request** Hi, it would be great to see `.toBeCalledOnceWith` custom matcher for jest mocks in this repo. Usage: ```js expect(fn).toBeCalledOnceWith(true); // usual way of doing this expect(fn).toBeCalledWith(true); expect(fn).toBeCalledTimes(1); ```...

**Bug** - `package` version: 0.11.5 - `node` version: v14.4.0 - `yarn` version: 1.22.4 Relevant code or config ```javascript it('should detect position properly for the first reference', async () => {...

### What Created a toBeWithinPercent function to check if a number is within x percent of a target number, and toContainKeysWithinPercent function to check if an object contains keys and...

This might need a bit of tweaking so consider it a WIP. Thought I put it up here to see if something like this would be useful, input is much...

### What New matcher for easier comparisons of arrays with floating-point numbers ### Why To make unit testing easier for developers ;) ### Notes ### Housekeeping - [+] Unit tests...

This is more of a discussion than a bug or feature request. I noticed that jest-extended contains some matchers that already exist in the latest Jest. Example: `toContainKey` === `toHaveProperty`...

Add toBeObjectContainingOrNull matcher like: ```js const expect = require("expect"); const okObject = { message: () => "Ok", pass: true }; expect.extend({ toBeTypeOrNull(received, argument) { if (received === null) return okObject;...