나는 그렇게처럼 before
후크 안에 현재 describe
이름을 얻으려고 :"이전"훅에서 모카 테스트 이름을 얻는 방법?
describe('increasing 3 times', function() {
before(function() {
console.log('test name');
});
...
});
나는 기본적으로 후크 이전의 '증가 3 번'문자열을 검색합니다.
어떻게 수행 할 수 있습니까?
감사합니다.
describe("top", function() {
before(function() {
console.log("full title:", this.test.fullTitle());
console.log("parent title:", this.test.parent.title);
});
it("test 1", function() {});
});
실행을 spec
기자와 함께이가 출력 :
모카가 API를 제공하지 않는 경우 변수에 이름을 저장할 수 있습니다. 그것은 좋게 읽히지 않을 것이다. –
사실 .. 나는 그것을 피하려고합니다. –