对流星,速度和茉莉很新,所以不确定我是否做错了什么,使用Jasmine作为它不适合的东西,或者这只是它的工作方式.
我发现我需要为我的所有测试设置超时,以便让它们通过.应该是这种情况还是我做错了什么?
例如,我正在运行的一些测试来检查验证消息:
describe("add quote validation", function() {
beforeEach(function (done) {
Router.go('addQuote');
Tracker.afterFlush(function(){
done();
});
});
beforeEach(waitForRouter);
it("should show validation when Quote is missing", function(done) {
$('#quote').val('');
$('#author').val('Some author');
Meteor.setTimeout(function(){
$('#addQuoteBtn').click();
}, 500);
Meteor.setTimeout(function(){
expect($('.parsley-custom-error-message').text()).toEqual("Quote can't be empty.");
done();
}, 500);
});
}
Run Code Online (Sandbox Code Playgroud)