DeviceFarmer / stf-syrup

Provides a minimal Promise-based dependency injection framework for Node.js.
Other
0 stars 1 forks source link

Bump chai from 1.9.2 to 1.10.0 #9

Closed dependabot-preview[bot] closed 4 years ago

dependabot-preview[bot] commented 4 years ago

Bumps chai from 1.9.2 to 1.10.0.

Release notes

Sourced from chai's releases.

1.10.0 / 2014-11-10

The following changes are required if you are upgrading from the previous version:

  • Users:
    • No changes required
  • Plugin Developers:
    • Review addChainableNoop notes below.
  • Core Contributors:
    • Refresh node_modules folder for updated dependencies.

Noop Function for Terminating Assertion Properties

The following assertions can now also be used in the function-call form:

  • ok
  • true
  • false
  • null
  • undefined
  • exist
  • empty
  • arguments
  • Arguments

The above list of assertions are property getters that assert immediately on access. Because of that, they were written to be used by terminating the assertion chain with a property access.

expect(true).to.be.true;
foo.should.be.ok;

This syntax is definitely aesthetically pleasing but, if you are linting your test code, your linter will complain with an error something like "Expected an assignment or function call and instead saw an expression." Since the linter doesn't know about the property getter it assumes this line has no side-effects, and throws a warning in case you made a mistake.

Squelching these errors is not a good solution as test code is getting to be just as important as, if not more than, production code. Catching syntactical errors in tests using static analysis is a great tool to help make sure that your tests are well-defined and free of typos.

A better option was to provide a function-call form for these assertions so that the code's intent is more clear and the linters stop complaining about something looking off. This form is added in addition to the existing property access form and does not impact existing test code.

expect(true).to.be.true();
foo.should.be.ok();

These forms can also be mixed in any way, these are all functionally identical:

expect(true).to.be.true.and.not.false();
expect(true).to.be.true().and.not.false;
expect(true).to.be.true.and.not.false;

Plugin Authors

Changelog

Sourced from chai's changelog.

1.10.0 / 2014-11-10

  • Merge pull request #297 from prodatakey/noopchainfunc
  • Merge pull request #300 from julienw/299-fix-getMessage-test
  • Fix #299: the test is defining global variables
  • Add a couple more unit tests
  • Add unit tests for chained terminating property asserts
  • Revise documentation wording
  • Add docs for function style NOOP asserts
  • Make the NOOP function a shared constant
  • Merge pull request #298 from dasilvacontin/negativeZeroLogging
  • why not more assertions
  • added test for inspecting -0
  • a more readable/simple condition statement, as pointed out by @keithamus
  • added check for logging negative zero
  • Change test to not trigger argument bug
  • Allows writing lint-friendly tests
  • readme: update contributors for 1.9.2
Commits
  • c8b3208 Release 1.10.0
  • 828f481 Merge pull request #297 from prodatakey/noopchainfunc
  • 6073d1c Merge pull request #300 from julienw/299-fix-getMessage-test
  • 84cba22 Fix #299: the test is defining global variables
  • 867563b Add a couple more unit tests
  • b4c0424 Add unit tests for chained terminating property asserts
  • c448e1d Revise documentation wording
  • bbd3aaf Add docs for function style NOOP asserts
  • 9142ce0 Make the NOOP function a shared constant
  • 3e35adf Merge pull request #298 from dasilvacontin/negativeZeroLogging
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking Bump now in your Dependabot dashboard.

Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)