Open abcoathup opened 4 years ago
The issue occurs with the latest version of jest@26.1.0
but doesn't occur with jest@24.9.0
, which is the version used in OpenZeppelin Test Environment integration test:
https://github.com/OpenZeppelin/openzeppelin-test-environment/blob/master/test-integration/jest/package.json#L14
The issue also occurs with jest@25.0.0
I experience the same issue but when I remove the cacheDirectory: "./tmp/"
from my jest.config.js I don't have the problem anymore ...here is the full config
module.exports = {
rootDir: "./tests/",
testMatch: ["**/?(*.|*-)+(spec|test).+(ts|tsx|js)"],
coverageDirectory: "./coverage/",
cacheDirectory: "./tmp/",
collectCoverage: false,
testTimeout: 300000,
};
Using Jest as the test runner, test fails with
Error: socket hang up
Reported in the community forum: https://forum.openzeppelin.com/t/error-invalid-json-rpc-response-when-testing-erc20-token-based-on-preset-with-jest-and-openzeppelin-test-environment/3373
I can reproduce with the following steps:
Using a contract based on mock ownable:
Using Ownable.test.js from OpenZeppelin Contracts modified for Jest
When run with Jest gives the following error:
Environment: Windows 10 WSL2