Getting started with Intern 4

Benefits of Intern 4

No loader configuration

Consistent test runner

Extension points

Programmatic interface

import Node from 'intern/lib/executors/Node';

// Instantiate the executor and assign it to the `intern` global
const intern = global.intern = new Node();

// Configure the executor
suites: './_tests/**/*.js'

// A simple reporter
intern.on('testEnd', test => {
if (test.passed) {
console.log(`+ ${}`);
else if (test.skipped) {
console.log(`~ ${}`);
else {
console.log(`- ${}`);

// Run intern, exiting the script with a non-zero exit code if Intern has an error => {

Intern 4 tutorial

  • Installation
  • Configuration
  • Unit testing
  • Functional testing
  • Code coverage analysis
  • Remote testing

Getting Help With Intern



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store