실패한 유닛 테스트가 있는데, 스택 트레이스에서 파일 이름을 가져와야하는 커스텀 재 스민 리포터를 작성하고 있습니다.stacktrace에서 파일 이름을 얻으십시오.
Verify the most recent consumer review is showing all information. (0.683 sec) - Expected true to be false, 'test title'. at Object.<anonymous> (/Users/xyz/Documents/tests/somefolder/xyz.test.js:25:72) at /Users/xyz/Documents/node_modules/jasminewd2/index.js:96:23 at new Promise (/Users/xyz/Documentsc/node_modules/selenium-webdriver/lib/promise.js:1043:7.....
바로 위의 파일 xyz.test.js
의 이름을 얻을 수있는 가장 좋은 방법은 무엇입니까?
의 사용 가능한 복제 [I 예외를 던질 때 나는 자바 스크립트 스택 추적을 얻을 수 있는가? (http://stackoverflow.com/questions/591857/how-can-i-get-a-javascript-stack-trace-when-i-throw-an-exception) –