I am trying out this: https://github.com/facebook/jest/issues/9430 and there is one thing I don't understand in this post:jest "global" property This is not really a global - it's injected into the module scope. Since the module scope is gone in ESM, we need to move it somewhere. Adding it to import.meta seems natural - there's an option called initializeImportMeta which we can use. I want to use jest.fn() but I don't understand how I can add jest by using import.meta.url or initializeImportMeta?
Submitted September 02, 2020 at 09:09AM by Kiluris
No comments:
Post a Comment