You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a Next.js app that uses testdouble.js for mocking dependencies in tests. Our test environment uses Jest and runs under Babel. This issue revealed itself when attempting to alter our Jest config to use the Next.js Compiler (SWC) as described here.
The following code snippet run under Babel results in a passing test.
Description
I'm working on a Next.js app that uses testdouble.js for mocking dependencies in tests. Our test environment uses Jest and runs under Babel. This issue revealed itself when attempting to alter our Jest config to use the Next.js Compiler (SWC) as described here.
The following code snippet run under Babel results in a passing test.
The same test run under SWC fails with the error
Issue
Objects with
Accessor
properties result inundefined
when run throughtd.imitate
.For example, given:
The line:
produces an object with the type
Running the class instance through
td.imitate
results in an object with the type
Environment
node -v
output:npm -v
(oryarn --version
) output:npm ls testdouble
(oryarn list testdouble
) version:Failing Test
Example Repo
npm it
and observe the issueRunkit Notebook
var td = require('testdouble')
at the topThe text was updated successfully, but these errors were encountered: