mercredi 14 août 2019

How do I trigger a function in an Ember component from the test component?

In the unit test ComponentA-test I would like to trigger the function load() in ComponentA, but I have problems doing so.

Before the assert.equal in the below code example I would like to add something simular to this.load() that I would have written in the component to trigger it. But I can't seem to find the right syntax for doing so.

    test('should render some information', async function (assert)) {
       await render(hbs``);

       assert.euqal(".info").text().trim(), "info text");
    }




Aucun commentaire:

Enregistrer un commentaire