Skip to content

Commit

Permalink
💫 Updating: [vest]: (3.1.0)
Browse files Browse the repository at this point in the history
8458837  minor(vest): support schema skip and only (#557) (Evyatar)
0cf5615  minor(vest): support custom message in test (#560) (Evyatar)
  • Loading branch information
ealush committed Jan 21, 2021
1 parent 45900c0 commit 20a047b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## vest: [3.1.0] - 2021-01-21

### Added
- 8458837 minor: support schema skip and only (#557) (Evyatar)
- 0cf5615 minor: support custom message in test (#560) (Evyatar)

## vest: [3.0.2] - 2021-01-20

### Fixed and improved
Expand Down
23 changes: 0 additions & 23 deletions packages/vest/docs/n4s/custom.md
Expand Up @@ -50,26 +50,3 @@ enforce.extend({
},
});
```

This is useful when combind with Vest tests, because vest test can use the string value as the test message:

```js
enforce.extend({
isChecked: value => {
return {
pass: !!value.checked,
message: () => 'value must be checked',
};
},
});

/*...*/

/*
tost = { checked: false }
*/

test('tos', () => {
enforce(tos).isChecked(); // will fail with the message: "value must be checked"
});
```
2 changes: 1 addition & 1 deletion packages/vest/package.json
@@ -1,6 +1,6 @@
{
"name": "vest",
"version": "3.0.2",
"version": "3.1.0",
"description": "Declarative validations.",
"main": "./vest.js",
"browser": "./vest.js",
Expand Down

0 comments on commit 20a047b

Please sign in to comment.