특정 실패 테스트에 대해 동일한 환경을 준비하기 위해 jasmine에서 테스트가 실패 할 때 사용할 수있는 자동화가 있습니까? 나는 spec runner로 karma을 사용하고있다. 예를 들어Jasmine 테스트 자동화 실패
: 두 번째 경우에 오류가 발생하면
describe("this plugin", function(){
beforeEach(function(){
$("body").append("<input type='text' id='myplugintester'>");
this.plugin = $("#myplugintester").plugin({
cond1: true,
cond2: new Date(),
condetc: null
});
}
afterEach(function(){
$("#myplugintester").data("plugin").destroy();
$("#myplugintester").remove();
}
it("should show the correct value", function(){
expect(this.plugin.value).toEqual("somevalue");
});
it("should display 'disabled' when cond3 is not null", function(){
this.plugin.cond3 = "blabla";
expect(this.plugin.value).toEqual("somevalue");
});
});
, 나는 코드로 잘못 무엇을 디버깅 할 테스트 페이지에이를 작성해야합니다.
var expect = function(){
// filler code
};
$("body").append("<input type='text' id='myplugintester'>");
this.plugin = $("#myplugintester").plugin({
cond1: true,
cond2: new Date(),
condetc: null
});
this.plugin.cond3 = "blabla";
console.log(this.plugin.value);
$("#myplugintester").data("plugin").destroy();
$("#myplugintester").remove();
모든 노드 패키지가 이것을 자동화합니까? 또는이 경우 다른 개발자가 어떻게 반응합니까?
참고 : 나는 속도 때문에 grunt-jasmine
에서 grunt-karma
으로 전환했습니다. grunt-jasmine
을 사용하면 Chrome 개발자 도구로 디버깅 할 수있는 브라우저에서 단일 테스트 케이스를 실행할 수있었습니다. 나는 카르마에 대해 여러 HTML 기자를 찾았지만 HTML 결과에 대해서만 언급했다. 그들은 인터럽트 및 디버깅 할 수있는 사양을 실행하지 않습니다.