Releases: theintern/intern
3.2.0
Release overview
- Dependency updates
- Grunt enhancements
- New
instrumenterOptions
property
Thanks to everyone who contributed code and bug reports, and special thanks to Ai Squared for their continued support!
Enhancements
- The grunt task now understands a
nodeOptions
option; this allows Node.js options to be passed to the Intern process started by grunt ((#604) - The Pretty reporter no longer displays the coverage table when there's no coverage data (#609)
- Intern now handles string values of
excludeInstrumentation
, such as from the command line (#577) - Intern understands an
instrumenterOptions
config property that allows configuration of the instrumenter. ThecoverageVariable
option may now be specified as a property ofinstrumenterOptions
. (#616) - New documentation has been added about debugging functional tests (#608)
- Update Leadfoot dependency to 1.6.7 for improved Microsoft Edge support and other fixes
- Update Dig Dug dependency to 1.4.1 to improve compatibility with Node 6 and update the default BrowserStack endpoint
Bugfixes
- Fix incorrect loader typing data in
intern.d.ts
(#612) - ReporterManager now creates parent directories for output files.(b8b979a)
Install from npm
cd /my/project/root
npm install intern --save-dev
Download source
3.1.1
3.1.0
Release Overview
This release includes a number of new features and dependency updates, as well as an update to improve how Intern works with npm.
Thanks to @alekstorm, @Arnavion, @bartoszkaczorek, @jacobroufa, @jrgm, @JSMike, @kitsonk, @LingSpb, @rodneyrehm, and @sholladay for their contributions.
Special thanks to @sholladay and Ai Squared for sponsoring the new features in this release!
New features
- Suite globbing -- The
suites
andfuntionalSuites
config properties may now contain glob expressions, such astests/unit/foo/*
. This feature works in both node and browser environments. When globs are used in a browser, tests must be served by the Intern proxy. (#359) - Improved async support for Suite -- An
async
function may now be called in suite lifecycle methods asthis.async([timeout])
. Like theasync
method in tests, it can be used to set a timeout for the async operations, and it returns an augmented Deferred object withcallback
andrejectOnError
methods. (#289) - Fail fast support -- When the
bail
config option totrue
, Intern will skip all remaining tests after a failed test. This applies to both unit and functional suites. (#413) - Suite skipping -- Suites now have a
skip
method that works like the existingTest#skip
. Calling it from a Suite lifecycle method, or from within a test (asthis.parent.skip([reason])
) will cause all remaining tests in the suite, and any sub suites, to be skipped. (#386)
Enhancements
- Update Dig Dug dependency to 1.4.0
- Update Leadfoot dependency to 1.6.6. This version improves compatibility with WebDriver servers that use traditionally-cased headers or use redirection when establishing a session.
- Update dojo dependency to 2.0.0-alpha.7. This improves compatibility with IE 9.
- Updated chai dependency to 3.5.0
- Intern's AMD dependencies that need to be browser-accessible are now linked into
browser_modules
rather thannode_modules
. This lets Intern work with npm shrinkwrap, and prevents warnings about extraneous packages during npm install . (#586)
Bug fixes
- Schema-less
baseUrl
's are now properly handled. (e.g., '//localhost')
Documentation updates
Install from npm
cd /my/project/root
npm install intern --save-dev
Download source
3.0.6
Release overview
- Bug fixes
Bug fixes
- Other bug fixes from Leadfoot 1.6.4.
Install from npm
cd /my/project/root
npm install intern --save-dev
Download source
3.0.5
Release overview
- Bug fixes
Bug fixes
- Tests that are skipped by
grep
are now correctly reported as being skipped. (d732da3) - The Runner reporter now clears the end of the line when reporting tunnel status messages, to avoid displaying confusing garbage from the previous message. (bbbad08)
- Other bug fixes from Leadfoot 1.6.3.
Install from npm
cd /my/project/root
npm install intern --save-dev
Download source
3.0.4
Release overview
- Bug fixes
Bug fixes
- Setting
waitForRunner
to'fail'
now only waits on fail, instead of acting the same as setting the value totrue
. (#502) - Any suite error now correctly causes Intern to exit with a non-zero status. (#498)
- Installation on Windows using npm 3 as a non-elevated administrator is now possible. (#500)
- Code coverage analysis now works correctly when
basePath
is relative. (#492) - Other bug fixes from Leadfoot 1.6.1 and 1.6.2.
Install from npm
cd /my/project/root
npm install intern --save-dev
Download source
3.0.3
Release overview
- Bug fixes
Bug fixes
- The test runner will no longer hang when no environments are specified (really). (#487)
- Reporters from the configuration file are no longer loaded when reporter overrides are specified. (The most frequent result of this bug was an error “Cannot find the Node.js require”.) (#491)
Install from npm
cd /my/project/root
npm install intern --save-dev
Download source
3.0.2
Release overview
- Bug fixes
Bug fixes
- A single
environments
option can now be specified from a Gruntfile or on the command line. (#486) - The test runner will no longer hang when no environments are specified. (#487)
- Using
loaderOptions
no longer causes Intern to crash in Node 0.10. (#489) - Absolute URLs to in the
loaders
configuration is now correctly loaded as-is, instead of attempting to be loaded relative to thebasePath
. (#485)
Install from npm
cd /my/project/root
npm install intern --save-dev
Download source
3.0.1
Release overview
- Bug fixes
Bug fixes
- The
args
,mode
, andconfig
properties of theintern/main
module are now correctly populated after a loader swap. (#450) capabilities.name
is no longer incorrectly overridden when it has been explicitly specified. (#461)- Various path resolution issues on Windows have been resolved. (#455, #459, #405)
- Various ANSI rendering issues on Windows have been resolved. (#454, bd02216)
- The test system will no longer hang when too many out-of-order messages are sent by the client when
waitForRunner
is disabled. (#466) - The test runner will no longer hang at startup when
functionalSuites
is left undefined. (#480) - The test runner will no longer crash when receiving a
suiteError
message. (#476) - Fixed a typo in the Runner reporter. (a8ef08c)
- Config
setup
andteardown
methods now run correctly when loading the test runner in Proxy Only mode. (#464) - Test objects are now accessible from
beforeEach
andafterEach
lifecycle methods when using the object, TDD, and BDD test interfaces. (#342) - Test suites with very large numbers of tests will no longer cause Selenium to incorrectly reset the unit test system in the middle of loading test modules. (#466)
Install from npm
cd /my/project/root
npm install intern --save-dev
Download source
3.0.0
Release overview
👾 Please report any bugs or regressions you encounter with this release!
- End of support for IE8 and earlier
- Improved ES6 support
- New executors API
- Configurable reporters
- New QUnit-compatible interface
- New TypeScript ambient declarations
- Test timeout improvements
- Test lifecycle improvements
- Bug fixes
Special thanks to @andyearnshaw, @apsdehal, @devpaul, @jason0x43, @kitsonk, @leohuber, @nicknisi, @plumlee, @sholladay, and @vladikoff for their code contributions!
Additional thanks to @Arnavion, @bartoszkaczorek, @devpaul, @JamesMGreene, @kitsonk, @mambocab, @mgingras, @nwhite89, @pocesar, @samplesizeofone, @sholladay, @stdavis, @treasonx, @vladikoff, @williamrjribeiro, and @wkeese for submitting tickets that were addressed in this release!
Backwards-incompatible changes
Here are the most common changes that need to be made when upgrading to Intern 3:
-
The new
basePath
configuration option takes the place of the oldloader.baseUrl
property. Nominally, this means that you’ll simply move a path fromloaderOptions.baseUrl
tobasePath
.loaderOptions.baseUrl
should be unset (or changed to whatever you want, now that it can be set independently!). If you never usedbaseUrl
before, you don’t need to change anything. -
The built-in reporters should now be addressed using an upper-case first letter (e.g.
'Console'
instead of'console'
). The test system will warn you about deprecated reporter naming. -
The following configuration options have been renamed for clarity and consistency:
useLoader
→loaders
loader
→loaderOptions
The test system will warn you about deprecated configuration option usage.
-
excludeInstrumentation
paths are now normalized to always use forward-slashes regardless of OS. Windows users using backslashes with this configuration option should update to use forward-slashes. -
For users upgrading from Geezer, calls to
this.get('remote')
need to change tothis.remote
. Any other calls to get Test or Suite properties also change similarly (fromthis.get('property')
to simplythis.property
). -
The paths to loaders in
loaders
are now relative to thebasePath
instead of relative to the default working directory, so these paths may need to be adjusted slightly if you are using a custom loader.
Other known backwards-incompatible changes that won’t affect most users:
- The future is now, so IE8 and earlier are no longer officially supported as targets for unit testing. Intern 2 will continue to work if you need to run tests in these dead browsers, or you may engage SitePen to create intern-geezer 3.
- Individual test timeouts are now inherited from their parent suites instead of from
Test.prototype.timeout
. If you were setting a global test timeout usingTest.prototype.timeout
, usedefaultTimeout
instead. - In order to allow Test runs to be repeatable, the
skipped
property of a test can no longer be set before callingtest.run
to prevent the test function from running. - Using the
intern!object
interface, a test named “timeout” is no longer allowed. (Thetimeout
property has changed to define the timeout for all tests in a given test suite.) beforeEach
andafterEach
are no longer executed when a test is skipped withgrep
. If you were relying on these functions being executed for skipped tests, please open a ticket.- Intern now uses a Promises/A+-compatible Promises implementation. If you were using Intern Promises directly and relied on the immediate invocation properties of resolved promises (this would be unusual), some of your code may execute in the wrong order. Promise callbacks are now guaranteed to execute on the next turn through the event loop.
- The Deferred object created by
this.async
no longer hasthen
,otherwise
, oralways
methods; if you were using these methods, usedfd.promise.then
,dfd.promise.catch
, anddfd.promise.finally
, respectively. - The Promise object created by
this.async
no longer hasotherwise
oralways
methods; if you were accessing these methods, usecatch
andfinally
, respectively. Note that the behaviour offinally
is different from the behaviour ofalways
: if the callback passed tofinally
does not throw or return a value other thanundefined
, the value will be passed through from the earlier promise. This matches more closely the wayfinally
works in JavaScript itself. - The order of certain reporter events is now slightly different. For example, the
tunnelStart
event is not emitted until after the tunnel is successfully started, whereas in Intern 2 it was emitted before attempting to start the tunnel. - There is no longer a main suite called 'main'. Instead, there are one or more root suites whose names are
null
. Reporters that were using/suite/end
and testing onsuite.name
to find the root suite can typically be switched to use therunEnd
event instead and look atexecutor.suites
for the list of root suites. - The name of the remote environment from the
environments
configuration property is now added to all test IDs when running the test runner (e.g. 'internet explorer 11 on WIN8.1'). - The JUnit reporter outputs to stdout by default. Use
{ id: 'JUnit', filename: 'report.xml' }
to restore the previous behaviour. - The following configuration options have been removed:
autoRun
→ return a Promise from abefore
function in the configuration file
suite.environmentType
has been removed; usesuite.remote.environmentType
instead.- Various properties have been moved away from the
intern/main
object:config
→executor.config
maxConcurrency
→executor.config.maxConcurrency
suites
→executor.suites
tunnel
→executor.tunnel
grep
→executor.config.grep
- Any custom interface that registers suites directly with Intern needs to change to use
intern.executor.register
instead ofintern.suites
. Read the custom interfaces documentation for more information.
New features
- Reporters have a new API and are now more testable and configurable. Custom reporters using the old style continue to be supported until 4.0, but are deprecated and should be updated to conform to the new API. (#141, #257)
- Test “executors” have been introduced. These objects represent the entire Intern testing lifecycle. They can be loaded and called directly from other JavaScript programs, and are customisable so you can make Intern conform to your preferred testing workflow. (#373)
- A new QUnit-compatible test interface has been introduced. Got a bunch of tests already written in QUnit? Just wrap them with
define([ 'intern!qunit' ], function (QUnit) { /* tests go here */ });
and you’re done! (#383) - Intern is now bundled with TypeScript definitions for better integration with TypeScript. (Note: due to limitations in TypeScript not all APIs are currently modelled.) (#318)
Enhancements
- The reporter used when the test runner executes unit tests in browsers (the WebDriver reporter) can now be configured with the new
runnerClientReporter
configuration option. The new configuration options allow the normal HTML rendering to be prevented, and to allow other reporters running on the server to pause unit test execution (for e.g. screenshots). (e4b56b9) - Early test run failures are now reported visibly, so you don’t have to guess why your tests aren’t loading. (#230)
- Reporters can now pause test execution by returning promises. This allows reporters to interact with the environment to collect any extra information that needs to be reported before/after tests, like screenshots. (#368)
- Suite lifecycle methods
beforeEach
andafterEach
are now passed a reference to the current Test object. (#342, #369, 0450494) - The loader’s
baseUrl
property is now separate from the test system’sbasePath
property, so you can specify the base path for your test environment independently from the loader’sbaseUrl
configuration. (#249) - Instrumented code is cached by the instrumenting proxy during test runs, improving test runner performance. (ab03be3)
- The new
defaultTimeout
configuration property specifies the default timeout for all tests in a test run. (#350) - The new
Test#restartTimeout
method allows a timeout limit to be restarted on long-running asynchronous tests. (33555ad) - Timeouts can now be configured on a per-suite basis by setting
this.timeout
inside a suite function (using TDD/BDD interfaces), or by setting thetimeout
property on a suite object (Object interface). (#342, #350) - TypeScript ambient declarations are now bundled with Intern. (#318)
beforeEach
andafterEach
are no longer executed when a test is skipped withgrep
. (#298)- Cancelling a test run with SI...