๐ Bug Report
toMatchInlineSnapshot fails if path module is mocked
jest.mock('path', () => ({}));
test('foo', () => {
expect({}).toMatchInlineSnapshot();
});
results in
โ Test suite failed to run
TypeError: path.resolve is not a function
Run npx envinfo --preset jest
Paste the results here:
System:
OS: macOS High Sierra 10.13.5
CPU: x64 Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz
Binaries:
Node: 8.9.4 - ~/.nvm/versions/node/v8.9.4/bin/node
Yarn: 1.7.0 - /usr/local/bin/yarn
npm: 5.6.0 - ~/.nvm/versions/node/v8.9.4/bin/npm
npmPackages:
jest: ^23.4.0 => 23.4.0
๐ Bug Report
toMatchInlineSnapshot fails if
pathmodule is mockedresults in
Run
npx envinfo --preset jestPaste the results here:
System: OS: macOS High Sierra 10.13.5 CPU: x64 Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz Binaries: Node: 8.9.4 - ~/.nvm/versions/node/v8.9.4/bin/node Yarn: 1.7.0 - /usr/local/bin/yarn npm: 5.6.0 - ~/.nvm/versions/node/v8.9.4/bin/npm npmPackages: jest: ^23.4.0 => 23.4.0