Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.
MIT License
4.88k stars 604 forks source link

Mocking xml2js with jest #604

Closed anrolmar closed 3 years ago

anrolmar commented 3 years ago

Hi.

I'm trying to mock xml2js library with jest in my unit tests, but I get the message, Cannot find module 'xmls2js'

I tried it, with jest.mock('xmls2js');

Leonidas-from-XIV commented 3 years ago

I have no idea about jest but the library is called xml2js, there is an s too much in your call, maybe that is the issue?

anrolmar commented 3 years ago

That's it. Sorry