jestjs / jest

Delightful JavaScript Testing.
https://jestjs.io
MIT License
44.27k stars 6.46k forks source link

TypeError: expect(...).toMatchObject is not a function #2195

Closed r14c closed 7 years ago

r14c commented 7 years ago

gist

$ node --version
v7.1.0
$ npm --version
3.10.9
$ yarn --version
0.17.2
jest version = 17.0.3
test framework = jasmine2
config = {
  "rootDir": "/Users/carlos/src/gitlab.com/citygro/broken-test",
  "name": "-Users-carlos-src-gitlab.com-citygro-broken-test",
  "setupFiles": [],
  "testRunner": "/Users/carlos/src/gitlab.com/citygro/broken-test/node_modules/jest-jasmine2/build/index.js",
  "transform": [
    [
      "^.+\\.jsx?$",
      "/Users/carlos/src/gitlab.com/citygro/broken-test/node_modules/babel-jest/build/index.js"
    ]
  ],
  "usesBabelJest": true,
  "automock": false,
  "bail": false,
  "browser": false,
  "cacheDirectory": "/var/folders/86/qrdp7g8d3370wtpgbjrws1g00000gn/T/jest",
  "coveragePathIgnorePatterns": [
    "/node_modules/"
  ],
  "coverageReporters": [
    "json",
    "text",
    "lcov",
    "clover"
  ],
  "expand": false,
  "globals": {},
  "haste": {
    "providesModuleNodeModules": []
  },
  "mocksPattern": "__mocks__",
  "moduleDirectories": [
    "node_modules"
  ],
  "moduleFileExtensions": [
    "js",
    "json",
    "jsx",
    "node"
  ],
  "moduleNameMapper": {},
  "modulePathIgnorePatterns": [],
  "noStackTrace": false,
  "notify": false,
  "preset": null,
  "resetMocks": false,
  "resetModules": false,
  "snapshotSerializers": [],
  "testEnvironment": "jest-environment-jsdom",
  "testPathDirs": [
    "/Users/carlos/src/gitlab.com/citygro/broken-test"
  ],
  "testPathIgnorePatterns": [
    "/node_modules/"
  ],
  "testRegex": "(/__tests__/.*|\\.(test|spec))\\.jsx?$",
  "testURL": "about:blank",
  "timers": "real",
  "transformIgnorePatterns": [
    "/node_modules/"
  ],
  "useStderr": false,
  "verbose": null,
  "watch": false,
  "cache": false,
  "watchman": true
}
cpojer commented 7 years ago

Unfortunately that function hasn't been part of a public Jest release yet. It's currently on master. Unfortunately we have no way of versioning the website right now so the latest version of the docs is already online :(

cpojer commented 7 years ago

The next Jest release will come out this week!

torifat commented 7 years ago

It got me too 😂

timwu20 commented 7 years ago

Please release this!

torifat commented 7 years ago

@timwu20 You can just use this meanwhile: https://gist.github.com/torifat/3ea2b8863ec38683ad2fdb22b3f2c904

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.