Skip to content

Commit

Permalink
we don't support accessType in spyOn yet
Browse files Browse the repository at this point in the history
  • Loading branch information
ChALkeR committed Jul 10, 2024
1 parent 5c96d48 commit f0bba8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ afterEach(() => {
const jest = {
fn: (impl) => jestfn(impl), // hide extra arguments
...allMocks,
spyOn: (obj, name) => {
spyOn: (obj, name, accessType) => {
assert(!accessType, `accessType "${accessType}" is not supported`)
assert(obj && name && name in obj && !(name in {}) && !(name in Object.prototype))
const fn = jestfn(obj[name], obj, name)
// eslint-disable-next-line @exodus/mutable/no-param-reassign-prop-only
Expand Down

0 comments on commit f0bba8e

Please sign in to comment.