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.
Learn more about Intern at https://theintern.github.io.
-
Install from npm
cd /my/project/root npm install intern --save-dev
-
Create a copy of the example configuration file in your package’s test directory and edit appropriately. See the configuration documentation for a list of all available options.
mkdir tests ; cp node_modules/intern/tests/example.intern.js tests/intern.js
-
Verify your configuration works by running the Node.js client and seeing that no errors are output.
node_modules/.bin/intern-client config=tests/intern
-
Start writing tests! Read writing tests in the user guide and the Intern tutorial to learn more!
If you need to support IE 6–8, there is also a version of Intern for legacy browsers.
Intern is a Dojo Foundation project offered under the New BSD license.
© SitePen, Inc. and its contributors