Skip to content

Commit 0545896

Browse files
committed
Adding toHaveNthReturnedWith
1 parent 44a75cf commit 0545896

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
* e-atbr (expectAsync toBeResolved)
3636
* e-thtr (expect toHaveReturnedTimes)
3737
* e-thrw (expect toHaveReturnedWith)
38+
* e-thnrw (expect toHaveNthReturnedWith)
3839

3940
* Jest Testing
4041
* e-tms (expect toMatchSnapshot)

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ You don't need to type any dashes: "ngrxr" -> "ng-rx-reducer" snippet
9595
| e-tbu | Expect toBe Undefined |
9696
| e-thbc | Expect toHaveBeenCalled |
9797
| e-thbcw | Expect toHaveBeenCalledWith |
98+
| e-thnrw | Expect toHaveNthReturnedWith(nthCall, value) |
9899
| e-thrt | Expect toHaveReturnedTimes(2) |
99100
| e-thrw | Expect toHaveLastReturnedWith(value) |
100101
| e-tm | Expect toMatch |

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Angular-BeastCode",
33
"publisher": "Mikael",
44
"displayName": "Angular 6 Snippets - TypeScript, Html, Angular Material, ngRx, RxJS & Flex Layout",
5-
"description": "220 Angular Snippets (TypeScript, Html, Angular Material, Flex Layout, ngRx, RxJS, PWA & Testing) Updated for v6.0.8",
5+
"description": "221 Angular Snippets (TypeScript, Html, Angular Material, Flex Layout, ngRx, RxJS, PWA & Testing) Updated for v6.0.8",
66
"icon": "images/Angular4.png",
77
"license": "MIT",
88
"repository": {

snippets/typescript.json

+1-1
Large diffs are not rendered by default.

src/snippets.json

+9
Original file line numberDiff line numberDiff line change
@@ -2656,6 +2656,15 @@
26562656
"$0"
26572657
]
26582658
},
2659+
"Test Expect .toHaveNthReturnedWith()": {
2660+
"prefix": "e-thnrw",
2661+
"description": "Expect toHaveNthReturnedWith(nthCall, value)",
2662+
"types": "typescript",
2663+
"body": [
2664+
"expect($1).toHaveNthReturnedWith($2, $3);",
2665+
"$0"
2666+
]
2667+
},
26592668
"Test Expect toHaveBeenCalledWith": {
26602669
"prefix": "e-thbcw",
26612670
"description": "Expect toHaveBeenCalledWith",

0 commit comments

Comments
 (0)