Skip to content

Releases: fiverr/passable

7.5.2

31 May 16:14
99cebcb
Compare
Choose a tag to compare

Fixes and non breaking changes

  • b71f156 remove unneeded files from package (gaearon)
  • 5427b27 continue my work from 2020-05-25-reduce-bloat (gaearon)
  • 97e074b [Patch] Update CODEOWNERS (#291) (raphaelboukara)

7.5.0

12 Nov 20:13
Compare
Choose a tag to compare

Additions

  • 37ed4d7 [Minor] Add draft as an export from passable (#204) (ealush)
  • aff8c86 [Minor] Create a Passable singleton | future hook support (#213) (ealush)

7.4.0

04 Nov 08:39
Compare
Choose a tag to compare

Additions

  • c0a9aec [MINOR] Add return value for test. (#197) (Evyatar Alush)

Fixes and non breaking changes

  • 7ec4daf Use anyone/any instead of any (#198) (Evyatar Alush)

Allow Failing With Rejection Message On Async Tests

09 Sep 08:23
Compare
Choose a tag to compare

By @michasherman

Rejecting with rejection message

What if your promise can reject with different messages? No problem!
You can reject the promise with your own message by passing it to the
rejection callback.

Notice that when using rejection messages we do not need to pass statement
argument to test. This means that the statement will always be inferred
from the rejection message.

In case you do pass statement, it will serve as a fallback message in any
case that the rejection message is not provided.

test('name', new Promise((resolve, reject) => {
    fetch(`/checkUsername?name=${name}`)
        .then(res => res.json)
        .then(data => {
            if (data.status === 'fail') {
                reject(data.message); // rejects with message and marks the test as failing
            } else {
                resolve(); // completes. doesn't mark the test as failing
            }
        });
}));

7.2.0 - Add isEven and isOdd rules

09 Sep 08:22
Compare
Choose a tag to compare
[Patch] Update dev deps

7.1.1

24 Jun 21:48
Compare
Choose a tag to compare

Added

  • [Patch] Add type definitions for cancel callback.

7.1.0

23 Jun 17:02
Compare
Choose a tag to compare

[7.1.0] - 2019-06-23

Added

  • [Minor] Added an option to directly import test from passable;
  • [Minor] any utility for assertions with OR || relationships.

7.0.0

11 Jun 20:38
Compare
Choose a tag to compare

[7.0.0] - 2019-06-11

Changed

  • [Major] Lowercased library name when imported on global object.
  • [Major] Renamed validationErrors and validationWarnings output properties to errors and warnings.
  • [Patch] Guarantee that .done() callbacks only run once.

Added

  • [Minor] .after() callback that can run after a specific field finished execution.
  • [Minor] New size rules (lessThan, greaterThan, lessThanOrEquals, greaterThanOrEquals, numberEquals, numberNotEquals).
  • [Minor] New size rules (longerThan, shorterThan, longerThanOrEquals, shorterThanOrEquals, lengthEquals, lengthNotEquals).
  • [Minor] New content rules (equals, notEquals).
  • [Minor] Support returning promise from test callback for async tests.
  • [Minor] Add cancel callback.

Removed

  • [Major] Removed output properties: hasValidationErrors, hasValidationWarnings.
  • [Major] Removed compound rules (anyOf, allOf, noneOf).
  • [Major] Removed general size rules (smallerThan, largerThan, smallerThanOrEquals, largerThanOrEquals, sizeEquals, sizeNotEquals).

6.3.3

04 Mar 20:00
Compare
Choose a tag to compare

Fixed documentation site

6.3.2

04 Mar 19:59
1517958
Compare
Choose a tag to compare
  • Reduced bundle size
  • Fixed es5 only browsers support