Skip to content
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

Possible module cache bug #114

Open
olsonpm opened this issue Jul 4, 2024 · 0 comments
Open

Possible module cache bug #114

olsonpm opened this issue Jul 4, 2024 · 0 comments

Comments

@olsonpm
Copy link

olsonpm commented Jul 4, 2024

I expect the module cache to be used for ./dep2.mjs in the following case.

repro code
// dep1.mjs
export default {}


// dep2.mjs
export default {}


// run.mjs
import quibble from 'quibble'
import dep1 from './dep1.mjs'
import dep2 from './dep2.mjs'

await quibble.esm('./dep1.mjs', {}, { mockDep1: true })

const dep2After = await import('./dep2.mjs')

console.log('dep2 === dep2After: ' + (dep2 === dep2After))
// logs "dep2 === dep2After: false"
to reproduce from my branch
$ git clone '[email protected]:olsonpm/repro.git'
$ cd repro
$ git checkout quibble-show-module-cache-bug
$ npm ci
$ node run.mjs

# logs "dep2 === dep2After: false"

is this expected behavior for some reason ? Or is this a regression of testdouble #492 ?

I'm willing to dig in if this is confirmed a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant