mercredi 22 novembre 2017

jest every thing after expect isn't called

my jest is not working as I expect it. See:

const res = {
        send: (content) => {

            expect(content).toEqual({
                app_status: 501,
                errors: {
                    jwt: {
                        location: 'body',
                        param: 'jwt',
                        value: undefined,
                        msg: 'The jwt is required'
                    }
                }
            });

            console.log("after expect");

            done();

        },
};

Basically EVERYTHING after the expect(content).toEqual ... in res.send is not called. I find that very confusing. I am getting no error except for that my test's are taking too long (because done) is not called and the test is not "closed". So my question is, am I missing something obviously?

Aucun commentaire:

Enregistrer un commentaire