Skip to content

Commit 0d34057

Browse files
committed
Adding toHaveLastReturnedWith
1 parent 6889c70 commit 0d34057

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
* e-thtr (expect toHaveReturnedTimes)
3737
* e-thrw (expect toHaveReturnedWith)
3838
* e-thnrw (expect toHaveNthReturnedWith)
39+
* e-thlrw (expect toHaveLastReturnedWith
3940

4041
* Jest Testing
4142
* 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-thlrw | Expect toHaveLastReturnedWith(value) |
9899
| e-thnrw | Expect toHaveNthReturnedWith(nthCall, value) |
99100
| e-thrt | Expect toHaveReturnedTimes(2) |
100101
| e-thrw | Expect toHaveLastReturnedWith(value) |

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": "221 Angular Snippets (TypeScript, Html, Angular Material, Flex Layout, ngRx, RxJS, PWA & Testing) Updated for v6.0.8",
5+
"description": "222 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

+10-1
Original file line numberDiff line numberDiff line change
@@ -2656,7 +2656,7 @@
26562656
"$0"
26572657
]
26582658
},
2659-
"Test Expect .toHaveNthReturnedWith()": {
2659+
"Test Expect toHaveNthReturnedWith()": {
26602660
"prefix": "e-thnrw",
26612661
"description": "Expect toHaveNthReturnedWith(nthCall, value)",
26622662
"types": "typescript",
@@ -2665,6 +2665,15 @@
26652665
"$0"
26662666
]
26672667
},
2668+
"Test Expect toHaveLastReturnedWith()": {
2669+
"prefix": "e-thlrw",
2670+
"description": "Expect toHaveLastReturnedWith(value)",
2671+
"types": "typescript",
2672+
"body": [
2673+
"expect($1).toHaveLastReturnedWith($2);",
2674+
"$0"
2675+
]
2676+
},
26682677
"Test Expect toHaveBeenCalledWith": {
26692678
"prefix": "e-thbcw",
26702679
"description": "Expect toHaveBeenCalledWith",

0 commit comments

Comments
 (0)