How do I use Jasmine to spy on a function that is imported via an ES6 default export?

You say you tried importing the wildcard and spying on default? What was the issue with that approach? I just ran into this problem and doing this solved it for me:

import * as widget from './widget';

describe('widget spec', () => {
    beforeEach(() => {
        spyOn(widget, 'default');
    });
});

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)