mardi 14 avril 2015

jest js multiple tests in one file

I have multiple test within one file, but the output only shows one test running. If I fail any one of the test it returns a fail, but still only shows it testing one of those.


Here is what I have set up



jest.autoMockOff();
jest.dontMock('../tasks/sass_compile_imports');
var getFileList = require('../tasks/sass_compile_imports');

describe('getFileList', function(){
var getList = getFileList.getFileList;
var checkFileType = getFileList.checkFileType;

it('returns array of folders', function() {
expect(getList('../css/*.scss')).toEqual(jasmine.any(Array));
});

it('checks if the the correct extention is part of the file path', function() {
expect(checkFileType('../css/*.scss')).toBeTruthy();
});
});


The output is the following



> gulp-sass-compile-imports@0.0.0 test /Sites/gulp-sass-compile-imports
> jest

Using Jest CLI v0.4.0
PASS __tests__/test2.js (0.194s)
1 test passed (1 total)
Run time: 0.383s


I'm a bit confused as to why it's not showing 2 tests. Anyone have any ideas?


Aucun commentaire:

Enregistrer un commentaire