Skip to content

Commit 2ae29ef

Browse files
committed
Adding toHaveReturnedWith
1 parent 9cecd5f commit 2ae29ef

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@
3232
* e-thbc (expect toHaveBeenCalled)
3333
* e-nthbc (expect not toHaveBeenCalled)
3434
* e-thbcw (expect toHaveBeenCalledWith)
35-
* e-atbr (expectAsync (toBeResolved)
36-
* e-thtr (expect toHaveReturnedTimes(2))
35+
* e-atbr (expectAsync toBeResolved)
36+
* e-thtr (expect toHaveReturnedTimes)
37+
* e-thrw (expect toHaveReturnedWith)
3738

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

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ You don't need to type any dashes: "ngrxr" -> "ng-rx-reducer" snippet
9696
| e-thbc | Expect toHaveBeenCalled |
9797
| e-thbcw | Expect toHaveBeenCalledWith |
9898
| e-thrt | Expect toHaveReturnedTimes(2) |
99+
| e-thrw | Expect toHaveLastReturnedWith(value) |
99100
| e-tm | Expect toMatch |
100101
| e-tmr | Expect toMatch regex |
101102
| e-tms | Jest Expect toMatchSnapshot |

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": "219 Angular Snippets (TypeScript, Html, Angular Material, Flex Layout, ngRx, RxJS, PWA & Testing) Updated for v6.0.8",
5+
"description": "220 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
@@ -2647,6 +2647,15 @@
26472647
"$0"
26482648
]
26492649
},
2650+
"Test Expect toHaveLastReturnedWith()": {
2651+
"prefix": "e-thrw",
2652+
"description": "Expect toHaveLastReturnedWith(value)",
2653+
"types": "typescript",
2654+
"body": [
2655+
"expect($1).toHaveLastReturnedWith($2);",
2656+
"$0"
2657+
]
2658+
},
26502659
"Test Expect toHaveBeenCalledWith": {
26512660
"prefix": "e-thbcw",
26522661
"description": "Expect toHaveBeenCalledWith",

0 commit comments

Comments
 (0)