PHPStorm으로 jsTestDriver 환경을 조정합니다.
3921 단어 JsTestDriverPhpStorm
참고
Backbone.js의 이벤트 테스트에서 빠진 이야기
CoffeeScript로 AsyncTestCase 작성
비동기 함수 callback 테스트
jsTestDriver plug-in 다운로드


라이브러리 추가
jsTestDriver 라이브러리를 추가하면 assertEquals와 같은 코드 완성이 가능합니다.
아래와 같은 테스트 코드 파일을 만듭니다.
hogetest.js
TestCase("test", {})
TestCase에 커서를 놓고 Option+Enter를 누릅니다. jsTestDriver assertion framework를 추가하시겠습니까? 와 같은 메시지가 표시되므로 OK를 누릅니다.

아래와 같이 환경설정에도 추가됩니다.

테스트 구성 파일 만들기
아래와 같은 테스트 설정 파일을 작성합니다. 파일의 내용까지는 여기에서는 설명하지 않습니다.
test.jstd
server: http://localhost:9876
load:
- hoge.js
test:
- hogetest.js
테스트 환경 설정


테스트 실행
어쨌든 이전 테스트 설정에서 테스트를 실행해 보겠습니다. mac의 경우 ^R입니다. 그러면 아래와 같은 오류가 표시되므로 Start a local server를 클릭합니다.

아래와 같이 jsTestDriver 화면이 추가됩니다.

테스트를 실행하고 싶은 브라우저를 선택하고, 다시 테스트를 시작(^R)하면 테스트가 실시됩니다.
Reference
이 문제에 관하여(PHPStorm으로 jsTestDriver 환경을 조정합니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/mm-git/items/aa31f454e19e1294caf3텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)