Portál AbcLinuxu, 9. června 2025 20:35
As of Node.js 14 there is no longer this warning when using ESM in Node.js. However, the ESM implementation in Node.js remains experimental. (...) Users should be cautious when using the feature in production environments.Ježišmarja. ES Moduly jsou věc č. 1, která by z JS a node udělala víceméně snesitelný a respektovatelný jazyk / platformu. Standardizováno to je už 5 let.
Node.js fully supports ECMAScript modules as they are currently specified.
jest.mock('../cesta/k/modulu/co/chces/mocknout', () => ({
nejakyExport: jest.fn()
}))
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.