New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow mocking property value in tests #13496
Commits on Oct 23, 2022
-
feat(jest-mock): Add mockProperty() method
Michal Kočárek committedOct 23, 2022 -
feat(jest-environment): Add mockProperty() method type to global Jest…
… object
Michal Kočárek committedOct 23, 2022
Commits on Dec 19, 2022
-
refactor(jest-mock): Be more strict for MockedPropertyRestorer generi…
…c type
Michal Kočárek committedDec 19, 2022 -
refactor(jest-mock): Allow mocking property named '0' or ""
Michal Kočárek committedDec 19, 2022 -
refactor(jest-mock): Throw more descriptive error messages when tryin…
…g to mock a property
Michal Kočárek committedDec 19, 2022 -
refactor(jest-mock): Allow mocking already mocked property with diffe…
…rent value
Michal Kočárek committedDec 19, 2022 -
refactor(jest-mock): Add type tests for mockProperty
Michal Kočárek committedDec 19, 2022 -
refactor(jest-runtime): Fix missing mockProperty export
Michal Kočárek committedDec 19, 2022 -
Merge remote-tracking branch 'upstream/main'
# Conflicts: # packages/jest-mock/__typetests__/mock-functions.test.ts
Michal Kočárek committedDec 19, 2022
Commits on Dec 20, 2022
-
refactor(jest-mock): Fix typing and interface of mockProperty methods
- Rename mockProperty to replaceProperty, as it's not exactly mocking. - Allow passing different types when mocking value. - Fix typings in TypeScript and cover them with tests.
Michal Kočárek committedDec 20, 2022 -
refactor(jest-mock, docs): Document replaceProperty method and its im…
…pact on the API
Michal Kočárek committedDec 20, 2022 -
refactor(docs): Remove forgotten TODO
Michal Kočárek committedDec 20, 2022
Commits on Dec 25, 2022
-
refactor(jest-mock, jest-types): Add additional tests for replaced pr…
…operty types
Michal Kočárek committedDec 25, 2022 -
refactor(jest-environment, jest-globals): Fix JSDoc comments for repl…
…aced property types and methods
Michal Kočárek committedDec 25, 2022 -
refactor(docs): Improve style of replaced property sections and apply…
… changes from code review
Michal Kočárek committedDec 25, 2022
Commits on Jan 3, 2023
-
-
-
Merge remote-tracking branch 'upstream/main'
# Conflicts: # CHANGELOG.md
Michal Kočárek committedJan 3, 2023 -
refactor(jest-mock): Fix type tests compatibility with TS 4.3
Michal Kočárek committedJan 3, 2023 -
refactor(jest-runtime): Fix forgotten rename of replaceProperty from …
…previous commits
Michal Kočárek committedJan 3, 2023 -
refactor(jest-mock): Hint to use replaceProperty when trying to mock …
…primitive value
Michal Kočárek committedJan 3, 2023 -
refactor(docs): Relate two files in examples by providing correct path
Michal Kočárek committedJan 3, 2023