Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ on:

jobs:
test:
strategy:
matrix:
version: [ 20, 22, 24 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
node-version: ${{ matrix.version }}
- run: npm ci
- run: npm install @rollup/rollup-linux-x64-gnu --save-dev
- run: npm run build
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how

:pencil: - chore

## 1.4.0
- :rocket: dropped chai dependency in favor of own `expect` implementation

## 1.3.0
- :rocket: added `to satisfy` validation to verify user-defined expectation provided as predicate
```Gherkin
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ This library supports a variety of validation types, which can all be negated by
- **`match schema`**: Validates data against an [ajv](https://www.npmjs.com/package/ajv) schema, which is useful for complex object validation.
- **`satisfy`**: verify user-defined expectation provided as predicate


## Standalone `expect`
You can use standalone extendable `expect` with many assertions out of the box

```typescript
import { expect } from '@qavajs/validation';

expect(1).toEqual(1);
```

## Test

To run the test suite for this package, use the following command:
Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { getValidation, getPollValidation, verify, validationRegexp, poll } from './src/verify';
export { getValidation, getPollValidation, verify, validationRegexp, poll, expect } from './src/verify';
116 changes: 12 additions & 104 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@qavajs/validation",
"version": "1.3.0",
"version": "1.4.0",
"description": "Lib that transform plain english definition to validation functions",
"main": "index.js",
"scripts": {
Expand All @@ -26,14 +26,12 @@
},
"homepage": "https://github.com/qavajs/validation#readme",
"devDependencies": {
"@types/chai": "^4.3.20",
"@types/node": "^24.3.0",
"@types/node": "^24.6.0",
"typescript": "^5.9.2",
"@vitest/coverage-v8": "^3.2.4",
"vitest": "^3.2.4"
},
"dependencies": {
"ajv": "^8.17.1",
"chai": "^4.5.0"
"ajv": "^8.17.1"
}
}
Loading