Just to clarify:
In order to be able to use Sinon spies, you need to export your module functionality in a certain way. Basically, use classes or objects.
Works:
export default {func() {},func2() {}}export const someLib {func() {},func2() {}}module.exports = {func() {}}class Ping {func() {}}export default Ping();or something similar.
What doesn't work:
export function func() {}export function func2 {}export const foo = () => {}and so on..