Intern is a complete test system for JavaScript designed to help you write and run consistent, high-quality test cases for your JavaScript libraries and applications. It can be used to test any JavaScript code. It can even be used to test non-JavaScript Web and mobile apps, and to run tests written for other test systems.
If you’re into name-dropping, Intern gets used every day by teams at Twitter, Stripe, Mozilla, IBM, Marriott, Philips, Zenput, Alfresco, Esri, HSBC, ING, Intuit, and more. It’s also the testing framework of choice for growing numbers of open-source projects.
Note that these instructions are for Intern 4 alpha. For Intern 3 instructions, please see the Intern tutorial.
-
Install from npm
$ cd /my/project/root $ npm install intern@next --save-dev
-
Create an
intern.json
file in your project root.{ "suites": "tests/unit/**/*.js" }
-
Verify that your configuration works by running Intern and checking that no errors are output.
$ node_modules/.bin/intern
-
Start writing tests!
See The Intern Guide for more Intern 3 documentation.
The best place to ask questions and get answers about Intern is Stack Overflow. Just tag your question with intern
.
If you have more immediate questions, or just want to chat with other people interested in Intern, there’s an #intern
IRC channel on freenode, and a Gitter room at theintern/intern.
Intern is a JS Foundation project offered under the New BSD license.
© SitePen, Inc. and its contributors