简体   繁体   中英

Unit Testing TypeScript with phpstorm or webstorm

I want to unit test TypeScript with phpstorm or webstorm. How can i set up testing framework in phpstorm/webstorm? Also, how can i use tsUnit Framework in phpstorm/webstorm?

tsUnit framework is not supported by WebStorm. But you can run unit tests written in typescript using karma (for client-side applications) or mocha (server-side). Both test runners are supported by WebStorm/PHPStorm. For Karma, see https://confluence.jetbrains.com/display/WI/Running+JavaScript+tests+with+Karma ; Mocha: http://blog.jetbrains.com/webstorm/2013/11/webstorm-7-0-2-is-available/ , https://www.jetbrains.com/webstorm/help/running-mocha-unit-tests.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM