- BREAKING CHANGE: Require Node 10+.
- Update chalk and check-types dependencies.
- BREAKING CHANGE: Joi 16.x contains major changes to the API.
.expectJSONTypes()
has been updated for compatibility with Joi 16.x, which is now required.
- Bug fix: Emit errors when multiple retries are exhausted.
- Update tests for nock API changes.
- Add
skipWhen()
method.
- Add
skip()
andskipIf()
methods.
This release involves a substantial rewrite and several breaking changes from 2.0.0. The changes since 1.5.0 are summarized here.
- Joi is now an optional dependency. If you are using
expectJSONTypes
you must install Joi on your own. - IcedFrisby has dropped support for Node 6 and now requires Node 8+.
globalConfig()
has been removed. Each test can be independently configured usingconfig()
, which takes the same options.reset()
has also been removed.- The plugin interface has changed.
this.current.expects
has been removed. Plugins should useafter()
instead.
- An
async run()
method has been added. This allows running IcedFrisby tests withinit()
blocks or using a test runner other than Mocha.
- Fix
timeout()
andretry()
(PR #71)- Retry on errors, not just timeouts
- Back off between retries
- Global setup respects
retryBackoff
option - Configure Mocha’s timeout to accommodate
.timeout()
and.retry()
- Clean up after
useApp()
(PR #72)
- Remove
setResponseType
and othersetResponseX
functions which were not part of the public API and were unused internally. - Significantly improve API documentation.
- Rewrite a bunch of internals using
async
. - Rewrite tests using
async
andrun()
. - Improve test coverage.
- Update dependencies.
- Correctly emit exceptions from
after()
andfinally()
- Rewrite a bunch of internals using
async
. - Rewrite tests using
async
andrun()
. - Update
check-types
dependency.
- Remove support for Node 6.
- Add
async run()
method to support running IcedFrisby withinit()
blocks or using a test runner other than Mocha.
- Improve test coverage.
- Improve documentation.
- Update dependencies.
- Remove globalConfig() (PR #106)
- Each request can be independently configured with config() which takes the same options
- Also removes reset() since that was only useful globalConfig()
- Change to plugin interface (PR #100)
- this.current.expects is gone, use after() instead
- Make Joi an optional dependency. (PR #84)
- Joi is only used when the developer invokes
expectJSONTypes
- The developer must install Joi on their own.
- The developer can specify the version number of their choice. Upgrading IcedFrisby does not affect the Joi version. Joi 12.0.0 works with Node 6+, 13.0.0 with Node 8+.
- The developer's specified version is the only copy of Joi installed.
- Joi is only used when the developer invokes
- Significantly improve API documentation (PR #94)
- Remove
setResponseType
and othersetResponseX
functions which were not part of the public API and are unused internally. (PR #89) - Fix
timeout()
andretry()
(PR #71)- Retry on errors, not just timeouts
- Back off between retries
- Global setup respects
retryBackoff
option - Configure Mocha’s timeout to accommodate
.timeout()
and.retry()
- Clean up after
useApp()
(PR #72) - Tidy request code (PR #101)
- Support header checks when multiple same-name headers exist (PR #73)
- Invoke
expectHeader
orexpectHeaderContains
with a third argument{ allowMultipleHeaders: true }
.
- Invoke
expectHeader
accepts regexes.expectHeaderToMatch
is an alias. (PR #73)- Upgrade Joi to 12.0.0.
- Drop support for Node 7. Continue support for Node 6 and 8.
- Improve documentation.
- Add only() helper (PR #70).
- Improve documentation
- Add expectNoHeader() helper (PR #63).
- Async hooks for before(), after(), finally() (PR #59).
- Update chai assertion checking to ^4.0.1
- Update chalk to ^2.0.1
- Support extending via plugins. Frisby is an ES6 class, and plugins
themselves are implemented as subclass factories. After being
composed with plugins,
frisby.create()
will do the right thing. For an example, see https://github.com/paulmelnikow/icedfrisby-nock
- Added
finally()
hooks which run even after an error and can be used for cleanup. Throw a MultiError if more than one error occurs. (#45) - Fixed issue where printing frisby objects caused side effects (#44)
- Fixed bug where
after()
callbacks are erroneously invoked after an error inbefore()
hook or request (#45) - Moved all internal state from the Mocha context to the frisby object (#45)
- Improved test coverage
- Identical API to 0.4.0
- Added support for plugins
- Added
before()
callbacks - Exported the constructor, not just the
create()
function
- Added
- Added
baseURI()
to set base URI without usingglobalSetup()
- Improved test coverage
- Upgraded dependencies to latest versions, including lodash 4.x branch
- Upgraded dependencies to latest versions
- Fixed a bug with hostnames that resolve but don't respond
- Breaking Changes
- Support for <= 0.12 is deprecated (LTS support ends December 2016)
- Set builds targets to latest stable versions of Node.js, 4, 5 and 6
- Don't start the app specified in useApp for every test, only once per global setup
- Added capability to use useApp in global setup
- Fixed issue where the Content-Type header is incorrectly overwritten when sending JSON data.
- Updated
chai
andqs
. Nailed downnock
dependency version.
- Added useApp(app, baseUri) method
- Fixed issue #6 where the inspect functions are not called if the test fails. Inspect functions are now run before the expect functions.
- Removed
[IcedFrisby]
branding from all mocha tests as per #5 - [Devs] added JSHint to the build to help enforce code quality
- Added this changelog
- Fixed faulty global setup tests
- Breaking Changes
- Fixed an issue where the JSON flag was getting set from
global setup
instead ofcurrent
- Fixed an issue where the outgoing uri was getting set from
global setup
instead ofcurrent
- Fixed an issue where global setup would not be fully reset (json flag, base path, etc. were not reset) when reset() was called
- Fixed an issue where the JSON flag was getting set from
< 0.1.0 (forked from Frisby)
- Refactored all expect() functions
- Uses Mocha as the driver instead of Jasmine
- Uses Chai for assertions
- Uses Joi for flexible and simple schema/type JSON validation
- expectJSON(...) is now strict. Undefined/null fields are not ignored and missing fields are considered errors
- Adds expectContainsJSON(...)! Test JSON responses without knowing every field.
- Uses lodash instead of underscore
- Returns a 599 (network timeout error) response if a request times out or is unavailable instead of a 500