Releases: theintern/intern
3.0.0-rc.2
👾 Please report any bugs or regressions you encounter with this release!
Enhancements (since last RC)
- An experimental
unitTestsWaitForReporterconfiguration option has been added. Set this tofalseif you do not need to influence the unit testing system from a reporter in the test runner (this is typical), which will significantly improve unit testing performance. (566bb8c) - Reporters are now configurable from the Grunt task. (#419)
- "intern" is now a valid configuration module ID. (#409)
- Istanbul output is now coloured when run through the Grunt task. (#422)
QUnit.extendhas been added to the QUnit interface. (#415)
Bug fixes (since last RC)
- Using
proxyOnlywill no longer crash the runner when it quits. (d2e7835) - User-aborted test runs will now correctly return a non-zero exit code. (36125d4)
- The test system will no longer attempt to retry a test run that has been cancelled. (e2c892d)
- The test system will now correctly return a non-zero exit code when it fails with an early error. (#414)
- The example configuration has been updated to remove an incorrect property name. (#418)
nullsuites option is supported again. (#420)- Other bug fixes from Leadfoot 1.5.2.
Install from npm
cd /my/project/root
npm install intern@beta --save-dev
Download source
3.0.0-rc.1
Release overview
👾 Please report any bugs or regressions you encounter with this release! The final release (or next RC) is scheduled for June 16!
- End of support for IE8 and earlier
- 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, @jason0x43, @leohuber, @nicknisi, and @plumlee for their code contributions!
Additional thanks to @Arnavion, @bartoszkaczorek, @JamesMGreene, @kitsonk, @mambocab, @mgingras, @nwhite89, @pocesar, @samplesizeofone, @sholladay, @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
basePathconfiguration option takes the place of the oldloader.baseUrlproperty. Nominally, this means that you’ll simply move a path fromloaderOptions.baseUrltobasePath.loaderOptions.baseUrlshould be unset (or changed to whatever you want, now that it can be set independently!). -
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:
useLoader→loadersloader→loaderOptions
The test system will warn you about deprecated configuration option usage.
-
excludeInstrumentationpaths 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
loadersare now relative to thebasePathinstead of relative to the default working directory, so these paths may need to be adjusted slightly.
Other 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, usedefaultTimeoutinstead. - In order to allow Test runs to be repeatable, the
skippedproperty of a test can no longer be set before callingtest.runto prevent the test function from running. - Using the
intern!objectinterface, a test named “timeout” is no longer allowed. (Thetimeoutproperty has changed to define the timeout for all tests in a given test suite.) beforeEachandafterEachare 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.asyncno longer hasthen,otherwise, oralwaysmethods; if you were using these methods, usedfd.promise.then,dfd.promise.catch, anddfd.promise.finally, respectively. - The Promise object created by
this.asyncno longer hasotherwiseoralwaysmethods; if you were accessing these methods, usecatchandfinally, respectively. Note that the behaviour offinallyis different from the behaviour ofalways: if the callback passed tofinallydoes not throw or return a value other thanundefined, the value will be passed through from the earlier promise. This matches more closely the wayfinallyworks in JavaScript itself. - The order of certain reporter events is now slightly different. For example, the
tunnelStartevent 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/endand testing onsuite.nameto find the root suite can typically be switched to use therunEndevent instead and look atexecutor.suitesfor the list of root suites. - The name of the remote environment 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 abeforefunction in the configuration file
suite.environmentTypehas been removed; usesuite.remote.environmentTypeinstead.- Various properties have been moved away from the
intern/mainobject:config→executor.configmaxConcurrency→executor.config.maxConcurrencysuites→executor.suitestunnel→executor.tunnelgrep→executor.config.grep
- Any custom interface that registers suites directly with Intern needs to change to use
intern.executor.registerinstead 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
- 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
beforeEachandafterEachare now passed a reference to the current Test object. (#342, #369, 0450494) - The loader’s
baseUrlproperty is now separate from the test system’sbasePathproperty, so you can specify the base path for your test environment independently from the loader’sbaseUrlconfiguration. (#249) - Instrumented code is cached by the instrumenting proxy during test runs, improving test runner performance. (ab03be3)
- The new
defaultTimeoutconfiguration property specifies the default timeout for all tests in a test run. (#350) - The new
Test#restartTimeoutmethod 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.timeoutinside a suite function (using TDD/BDD interfaces), or by setting thetimeoutproperty on a suite object (Object interface). (#342, #350) - TypeScript ambient declarations are now bundled with Intern. (#318)
beforeEachandafterEachare no longer executed when a test is skipped withgrep. (#298)- Cancelling a test run with SIGINT (ctrl+c) now cleans everything up before quitting.
- The test system will automatically terminate after a test run has completed, even if there are outstanding open sockets/timeouts created by defective code, instead of hanging forever waiting for the sockets/timeouts to finish.
excludeInstrumentationpaths are now normalized to always use forward-slashes regardless of OS. (ab776f5)- Chai is updated to 3.0.0. (#387, #400)
NODE_ENVcan now be passed from a Grunt file. (#343)- Code instrumentation can be completely disabled by setting
excludeInstrumentationtotrue. (https://git...
2.2.2
Release overview
- Bug fixes
Bug fixes
- The Geezer edition of Intern contained a bug in its implementation of Test and Suite objects for legacy browsers where the
/test/newand/suite/newtopics were being published before the objects were fully constructed. This error was exposed when the testing lifecycle was changed to load reporters before test modules. The incorrect translation has been fixed. (#316)
Install from npm
Regular edition
|
or |
Geezer edition
|
Download source
2.2.1
Release overview
- Bug fixes
Bug fixes
- Bug fixes from Dig Dug 1.2.1
Install from npm
Regular edition
|
or |
Geezer edition
|
Download source
2.2.0
Release overview
♨️ Check out the highlights on our blog!
- New pretty reporter
- New actual/expected object difference output
- Enhanced error detection and reporting during startup
- Updated to Dig Dug 1.2
- Bug fixes
Special thanks to @devpaul, @jason0x43, @neonstalwart, @unrealguard, and @vladikoff for their code contributions!
Additional thanks to @Blasz and @zanona for submitting tickets that were addressed in this release!
Enhancements
- A new pretty reporter that displays progress bars for each environment during test runs has been added. This new reporter will become the default reporter for the Node.js client and the test runner in a future release. For now, try it by setting
reporters=prettyon the command-line. (#258) - When an assertion error occurs because an actual object doesn’t match the expected object, the logged error message will now show a unified diff between the two objects. Undefined properties, regular expressions, dates, arrays with properties, functions with properties, etc. are all supported. (7c051e9)
- Improved error handling so early errors in test modules (like syntax errors) are now correctly caught and reported by the test system. (#254)
- On Geezer,
assert.deepEqualshould now work the same as Chai’sdeepEqualwhen comparing typed objects. (#284) - Additional enhancements in Dig Dug 1.2
Bug fixes
- Fixed an issue where source maps referenced with relative paths would sometimes not be discovered by the source mapping system. (#303)
- Fixed a rare condition where Intern installation would fail in cases where npm deduped all of Intern’s dependencies and deleted its
node_modulesdirectory. (#302) - Fixed a problem where the HTML reporter wouldn’t recognise tests as skipped if their skip message was empty. (#295)
- Fixed a problem with the TeamCity reporter where the reporter used ISO-8601–compliant date strings, but TeamCity doesn’t fully comply with ISO-8601. (#287)
- Additional bug fixes in Dig Dug 1.2
Install from npm
Regular edition
|
or |
Geezer edition
|
Download source
2.1.1
Release overview
- Bug fixes
Bug fixes
- The
functionalSuitescommand-line override now works properly when overridden with a single value. (#272) - The
suitesandfunctionalSuitescommand-line overrides now work properly when specifying an empty value. (#268, #269) - ClientSuite is no longer added to a test run when the
suitesargument has been overridden to run no unit tests. (#270) - The combined reporter no longer reports invalid download progress. (#265)
- Additional bug fixes from Leadfoot 1.1.1
Install from npm
Regular edition
|
or |
Geezer edition
|
Download source
2.1.0
Release overview
♨️ Check out the highlights on our blog!
- New HTML and JUnit reporters
- New test filtering with
grepandskip - Improved functional test performance
- Improved proxy performance and functionality
- Updated to Leadfoot 1.1
- Updated to Dig Dug 1.1
- Bug fixes
Special thanks to @Blasz, @dennisreimann, @devpaul, @itorrey, @jason0x43, @klipstein, @kriszyp, @liucougar, @msssk, @neonstalwart, and @vladikoff for their code contributions!
Additional thanks to @facildelembrar, @Flowkap, @hustcer, @phated, @sbrunot, @Shurakai, @spotnape, and @steveoh for submitting tickets that were addressed in this release!
Extra special thanks to @vladikoff for presenting Intern at this year’s jQuery Conference in Chicago! If you are planning on presenting Intern at an event, please let us know and we’ll send you a bunch of cool stickers of the Intern intern to give away!
Backwards-incompatible changes
- In Intern 2.0, the
remote.moveMouseTocommand was broken and always moved the mouse globally instead of relative to the last found element. Intern 2.1 corrects this regression, so this function now works the same as it did in Intern 1.x. (#240) - Reporting of unhandled rejected promises created by Intern (
this.async, and other internal parts) has been enabled in the non-Geezer edition. This may cause additional console messages to be written if rejected promises are created without any error handlers.
Enhancements
- A new HTML reporter that displays a summary of a test run has been added to
client.htmlas a default reporter. (#103, #194) - A new JUnit XML reporter has been added. This reporter can be used with Jenkins/Hudson to enable test drill-down via the GUI. (#193, #102)
- Tests can now be filtered by ID using a
grepregular expression. This property can be specified in an Intern configuration file or as a flag on the command-line. (#195) - Tests can now be programmatically skipped by calling
this.skip(reason)from a test. (#195) functionalSuitescan now be specified on the command-line. (#220, #225, #123)- The unit test system is now bypassed entirely if there are no unit tests and only functional tests, which improves the performance of server-side app testing and allows functional tests to be executed even when the instrumenting proxy is inaccessible. (#241)
- Reporting of unhandled rejected promises created by Intern (
this.async, and other internal parts) has been enabled in the non-Geezer edition. This should reduce confusion - A new
Suite#timeElapsedproperty has been added for learning the total time it takes a suite to execute, including all setup and teardown functions. (d278328) - The
intern/main.modeproperty is now available from configuration files. (#263) - It is now possible to reverse-proxy to Intern from a subdirectory. (#250, #251)
- Proxy performance has been improved by disabling the Nagle delay. (#235)
- All fatal errors are now reported by the console reporter. (#213)
- Additional enhancements in Leadfoot 1.1
- Additional enhancements in Dig Dug 1.1
Bug fixes
- Fixed code instrumentation when running Node.js on Windows. (#255)
- Fixed loading CommonJS modules when using the Geezer edition with RequireJS. (#246)
- Additional bug fixes in Leadfoot 1.1
- Additional bug fixes in Dig Dug 1.1
Install from npm
Regular edition
|
or |
Geezer edition
|
Download source
2.0.3
Release overview
- Leadfoot updated to 1.0.2 (no, really)
Bug fixes
Install from npm
Regular edition
|
or |
Geezer edition
|
Download source
2.0.2
Release overview
- Leadfoot updated to 1.0.2
Bug fixes
Install from npm
Regular edition
|
or |
Geezer edition
|
Download source
2.0.1
Release overview
- Leadfoot updated to 1.0.1
- Istanbul updated to 0.2.16
Bug fixes
- The
pollUntilpromise helper in Leadfoot did not callsetExecuteAsyncTimeout, which caused polling to time out before it was supposed to. (theintern/leadfoot#1) - Istanbul’s
vmhook did not account for thefilenameargument being optional, which caused tunnel downloads that used tarballs to fail since the decompress code usedvmwithout a filename. (gotwarlost/istanbul#215)
Install from npm
Regular edition
|
or |
Geezer edition
|