numberkruncher
error: TypeScript files are not supported in npm packages:
I am wondering why I cannot import a .ts file from a
node_modules
directory.
If I could do this then I could use npm as a package manager which would allow me to take advantage of the things that I love about deno as well as being able to work with modules in a familiar way (eg. bundle templates, stylesheets, static assets, whatnot alongside the scripts).
eg.
or
2 replies
How to mock modules like you can with jest?
With node/jest I was able to mock specific functions from modules using
jest.mock
at the start of the test file. How can I do this in Deno? I have a module which calls a function from another module:
How can I substitute foo
with a mock/stub/fake for the scope of a test file?
3 replies