Justin Searls

Results 282 comments of Justin Searls

If you're talking about Node's native ESM support specifically, I can't imagine it'd work natively (it's been a year since I've looked) for the same reason. In general, any support...

That said, it's only the test that needs to drop down to using `require()` calls. The production code should be able to be 100% ESM without any changes to support...

@NullVoxPopuli seems reasonable? I have to own my ignorance here because I've never published a native module-module. I'd be open to someone showing how or opening a PR that adds...

@electerious I believe `replaceEsm` works like `replace`, where you have to replace the dependency before you load the subject. (See the [docs](https://github.com/testdouble/testdouble.js/blob/main/docs/7-replacing-dependencies.md#nodejs)). Otherwise the module under test will be loaded...

@electerious apologies i'm not sure how it works because I still haven't had a chance to use it myself -- @giltayar?

Great issue report and thanks for committing a failing test while you're at it (link to referenced commit: https://github.com/gurpreetatwal/testdouble.js/commit/c16e8325b509c0eddb4f0bd24bb6b4c470d6fa57 ) In the meantime, I assume you were doing a `td.replace('sentry')`...

Ah, well if that was your actual usage then I'd really like for that to actually work (even though the "right" answer might be to have a wrapper you own...

Great catch! I'm not using TypeScript so I tend to rely on folks like you to keep the typings file we publish accurate and up to date. Please send a...

Sorry as I haven't used td.js with typescript. @lgandecki?

Apologies, as this conversation makes sense but the typescript bits are something I can't speak to with any confidence. I think in general, greater type enforcement is a good thing...