I am running a jasine test with a protractor and I'm not sure how the wait works. I expect jasmine to fail me, as I obviously failed. This is not true.
I am using grunt-protractor-runner 1.2.1 which uses Jasmine2.
I have this test case:
var validateObject = function(object) {
expect('1.0').toEqual('1.0');
console.log(object['property']);
console.log(object['property'] === '1.0');
console.log(typeof object['property']);
expect(object['property']).toEqual('1.0');
expect(object['property']).toEqual('1.1');
};
var readSomething = function(done) {
fs.createReadStream('folder + fileName')
.pipe(operation.Parse())
.on('entry', function(file) {
validateObject(file);
.on('end', function(){
done();
});
};
describe('test this', function () {
it("stuff", function (done) {
expect('asd').toEqual('asd');
readSomething(done);
});
});
Any idea what I'm missing here? Am I missing some asynchronous functions? One thing I noticed when I comment on "done ()", a few seconds after everything has already happened, the logs start showing me one of them for each iteration that calls validateObject:
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
The last active task was:
unknown
F
Failures:
1) ----Bulkd Process----- testing the whole bulk process
Message:
Expected '1.0' to equal '1.1'.
console.logs .
, , done . ? () async?
"should". . , .