Skip to content

Commit

Permalink
3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
OlehDutchenko committed Mar 7, 2021
1 parent 7c6bbd6 commit 75220ec
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
41 changes: 20 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,26 @@ _Returns:_ `void`
_Examples:_

```ts
// x.ts
export const x = (y: boolean, z: number, w: number):number|null => y ? z + w : null;

// x.spec.ts
import x from 'x.ts'
import { jestFunctionSignatureTest } from '@wezom/toolkit-jest'

describe('Function signature should match specification', () => {
jestFunctionSignatureTest(x, [
{
parameters: [true, 4, 5],
expected: 9
},
{
name: 'Custom test name'
parameters: [false, 4, 5],
expected: null
}
]);
});

// x.ts
export const x = (y: boolean, z: number, w: number): number | null => (y ? z + w : null);

// x.spec.ts
import x from 'x.ts';
import { jestFunctionSignatureTest } from '@wezom/toolkit-jest';

describe('Function signature should match specification', () => {
jestFunctionSignatureTest(x, [
{
parameters: [true, 4, 5],
expected: 9
},
{
name: 'Custom test name',
parameters: [false, 4, 5],
expected: null
}
]);
});
```

[comment]: <> (AUTODOC-TOOL-END)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wezom/toolkit-jest",
"version": "3.1.0",
"version": "3.1.1",
"description": "Useful tools for working with Jest",
"main": "dist/index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/function-signature-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* expected: 9
* },
* {
* name: 'Custom test name'
* name: 'Custom test name',
* parameters: [false, 4, 5],
* expected: null
* }
Expand Down

0 comments on commit 75220ec

Please sign in to comment.