Jake Bailey

Results 1405 comments of Jake Bailey

I think "partial" is the correct term to use, but I would recommend renaming those functions to be more descriptive, e.g. to explicitly call this function `partial`. But, I might...

Regarding: ```js // use '*' to create a "partial mock" const pathWrapPartial = await esmock('../src/pathWrap.js', { path: { dirname: () => '/home/' }, '*': true, }) ``` I find this...

If I'm mocking a library, 90% of the time it's because it has side effects. I think I'd be pretty frustrated if I was doing a refactor and my tests...

I'm not sure what you mean; doesn't that error imply that the test code just needs to add what the importing code is using? That seems like a good error...

I'm coming from a background of jest mocks (and other mocking libraries for objects like sinon, ts-mockito, typemoq, ts.moq), all of which aren't partial like that; I guess I would...

I'm not sure, but I don't know if I have enough info to reproduce it. I'm happy to look if you have some steps. FWIW I would personally recommend just...

You could always have: ```ts import { partialMock, strictMock } from "esmock" const foo = partialMock(...); ``` If you're trying to make the two methods visually identical and everyone from...

> It is understood if you are busy or for any reason can't use time on this. Also, maybe the ts-node developer will respond here https://github.com/TypeStrong/ts-node/discussions/1877 Yeah, I'm pretty busy...

Related, yes, though it should all be supported at this point; maybe you're missing a tsconfig with the right options to get TS into module mode, or something.

If this is the "go up from the current module" heuristic, I didn't implement it; I did push the code out to pyright, though, if you're going off of the...