Skip to content

4.0.0-alpha.5

Pre-release
Pre-release

Choose a tag to compare

@jason0x43 jason0x43 released this 11 Jun 23:14
· 455 commits to master since this release

Overview

This release contains a number of changes from alpha.4. Some of the more significant are:

  • The browser bundle no longer tries to load a default config or start Intern itself.
  • The config system has been significantly changed.
    • Child configs are now supported
    • Environment-specific properties (e.g., browserLoader, nodeSuites) have been moved under environment properties ("browser": { "loader": ... })
    • Resource lists (suites, functionalSuites, plugins, etc.) can be appended to rather than overriding when extending a config by adding a '+' to the name (suites+: 'some_suite.js', or intern suites+=tests/some_suite.js)
  • The WebDriver executor was merged into the Node executor. The Node executor now behaves in a consistent manner based on its configuration -- if there are suites or node.suites, they're run in node; if there are environments and tests to run in them, WebDriver tests will be run.
  • New config options:
    • functionalCoverage: If false, intern won't record coverage data generated by functional tests.
    • showConfig: If true, Intern will show the resolved config, then exit.
    • showConfigs: If true, Intern will show information about the current config file (intern.json by default), including its description and a list of any child configs it contains.
    • coverageSources: Coverage data will be generated for all files in this list, even if they weren't loaded by suites. This makes seeing what files haven't been tested easier.
  • A plugin API was added. This API replaces the specialized interface, reporter, and assertion APIs, and the preload config property. Plugins are loaded just after the loader has been setup (if one is being used), so they can take advantage of the loader.

Other changes and bug fixes include:

  • The runner process now sets the process state to a non-zero value when there are test failures
  • Tests and suites are now canceled if the overall run task is canceled
  • Many self-tests have been ported/rewritten/created. CI coverage is now pushed to codecov.io.
  • The object interface now takes a string name as its first parameter (registerSuite('name', { ... }) vs registerSuite({ name: 'name', ... })).
  • The loader API was updated. Loader scripts now accept an options object and return a loader function. This function should accept a list of modules or scripts and load them.
  • More errors are caught and reported. Things generally fail faster (e.g., if an unknown plugin is loaded, or a suite is registered twice)
  • The Runner reporter is now the default for the Node executor.
  • The Runner reporter now supports hideSkipped and hidePassed options.
  • Browser self-tests now use the Dojo 2 loader instead of SystemJS
  • Error formatting improvements -- Intern is now better at tracing stack trace sources through multiple layers of source map.
  • Executor#createDeferred was removed in favor of native/shimmed Promises. Enhanced Deferred objects are still returned by Test#async.
  • A number of bugs and incomplete features in the Benchmarking code were resolved. * All dependencies were updated
  • The npm watch script has been updated to the point of being useful
  • Webpack is now used for bundling instead of browserify
  • A bug was fixed in RemoteSuite where the connect timeout wasn't canceled when a suite was canceled. This could hang Intern for the length of a timeout.
  • The Node runner now supports an INTERN_ARGS environment variable. This variable is treated just like a command line, including being parsed into arguments using shell semantics. Actual command line args take precedence over
  • Reporters now show the actual remote browser name and version vs what was requested (e.g., "Chrome 58.x on MAC" vs "chrome on any platform")

See the docs for more info.