vendredi 31 juillet 2015

karma jasmine not executing all tests

so i have 6 karma jasmine tests, in one file i have 3, which im testing all my factories

the test file for the factory is as followed

describe('Quiz Factories', function() {

    beforeEach(function() {

        //Ensure angular modules available
        beforeEach(module('geafApp'));

        beforeEach(inject(function (_counter_) {
            counter = _counter_;
        }));

        beforeEach(inject(function (_answer_sheet_) {
            answer_sheet = _answer_sheet_;
        }));

        beforeEach(inject(function (_questions_) {
            questions = _questions_;
        }));

    });

    it('it should return a number', function () {
        expect(counter).toBeNumber();
    });

    it('it should return an empty object', function () {
        expect(answer_sheet).toBeEmptyObject();
    });

    it('it should return an empty object', function () {
        expect(questions).toHaveObject(answers);
    });

});

in my console log its showing executed 4 of 6

PhantomJS 1.9.8 (Mac OS X 0.0.0): Executed 4 of 6 SUCCESS (0.004 secs / 0.029 secs)

So for some reason after the first it 'it' in the factory test file its skipping over the other two, even though there is no failures and all are contained in a beforeEach

Aucun commentaire:

Enregistrer un commentaire