Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swashcap/setup-polly-jest-constructor-error
Testing https://github.com/gribnoysup/setup-polly-jest/issues/5
https://github.com/swashcap/setup-polly-jest-constructor-error
Last synced: 5 days ago
JSON representation
Testing https://github.com/gribnoysup/setup-polly-jest/issues/5
- Host: GitHub
- URL: https://github.com/swashcap/setup-polly-jest-constructor-error
- Owner: swashcap
- License: apache-2.0
- Created: 2019-09-15T04:35:02.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T10:23:11.000Z (almost 2 years ago)
- Last Synced: 2023-04-01T03:29:02.678Z (over 1 year ago)
- Language: JavaScript
- Size: 745 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# setup-polly-jest-constructor-error
Testing https://github.com/gribnoysup/setup-polly-jest/issues/5
## Setup and Running
Ensure you have [Node.js](https://nodejs.org/en/) `>= 12.10.x` and [yarn](https://yarnpkg.com/lang/en/) installed. Then:
1. Clone the project
2. Install dependencies:```shell
cd setup-polly-jest-constructor-error
yarn
```
3. Run the tests:```shell
yarn test
```Or run them individually:
```shell
# 0.5.2
yarn jest setup-polly-jest-0.5.2/index.test.js
# ...# 0.5.3-issue-5.0
yarn jest setup-polly-jest-0.5.3-issue-5.0/index.test.js
```## Output
### 0.5.2
```shell
$ yarn --silent jest setup-polly-jest-0.5.2/index.test.js
(node:3355) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'stop' of null
(node:3355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:3355) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
FAIL setup-polly-jest-0.5.2/index.test.js
sample
✕ assertion (91ms)● sample › assertion
PollyError: [Polly] Persister matching the name `fs-whoops` was not registered.
at Object.assert (node_modules/@pollyjs/utils/src/utils/assert.js:5:11)
● sample › assertion
TypeError: Cannot read property 'configure' of null
27 |
28 | test("assertion", async () => {
> 29 | context.polly.configure({
| ^
30 | recordIfMissing: true
31 | });
32 |at Object.configure (setup-polly-jest-0.5.2/index.test.js:29:19)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 0.655s, estimated 1s
Ran all test suites matching /setup-polly-jest-0.5.2\/index.test.js/i.
error Command failed with exit code 1.
```### 0.5.3-issue-5.2
```shell
$ yarn --silent jest setup-polly-jest-0.5.3-issue-5.4/index.test.js
FAIL setup-polly-jest-0.5.3-issue-5.4/index.test.js
sample
✕ assertion (85ms)● sample › assertion
TypeError: Cannot read property 'configure' of null
27 |
28 | test("assertion", async () => {
> 29 | context.polly.configure({
| ^
30 | recordIfMissing: true
31 | });
32 |at Object.configure (setup-polly-jest-0.5.3-issue-5.4/index.test.js:29:19)
● sample › assertion
PollyError: [Polly] Persister matching the name `fs-whoops` was not registered. Check `setupPolly` method and make sure it's configured correctly.
at Object.assert (node_modules/@pollyjs/utils/src/utils/assert.js:5:11)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 0.623s, estimated 2s
Ran all test suites matching /setup-polly-jest-0.5.3-issue-5.4\/index.test.js/i.
error Command failed with exit code 1.
```