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
-
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!
- How To - quick answers to common questions
- Concepts - testing concepts and definitions
- Configuration - how to configure Intern
- Running - how to run Intern
- Writing Tests - the various ways of writing tests with Intern
- Architecture - how Intern is organized
- Developing - for Intern developers
- Contributing - how to contribute to Intern development
See The Intern Guide for more information about Intern 3.
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. See the
Help page for more information.
Intern is a JS Foundation project offered under the New BSD license.
© SitePen, Inc. and its contributors