Skip to content

Commit

Permalink
Fixes issue jestjs#3073. Typechecks prototype before assignment. Fixe…
Browse files Browse the repository at this point in the history
…s interaction with mongoos
  • Loading branch information
Hannah Luedeke committed Oct 16, 2018
1 parent ec382f5 commit 67081da
Show file tree
Hide file tree
Showing 9 changed files with 513 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/jest.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

423 changes: 423 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion packages/jest-mock/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,8 @@ class ModuleMockerClass {
if (
metadata.type !== 'undefined' &&
metadata.type !== 'null' &&
mock.prototype
mock.prototype &&
typeof mock.prototype === 'object'
) {
mock.prototype.constructor = mock;
}
Expand Down

0 comments on commit 67081da

Please sign in to comment.