Skip to content

Commit 860d69c

Browse files
committed
add testing snippets
* after/before Each jest functions
1 parent 5378ed2 commit 860d69c

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ u-action // Redux action
5252
u-it // Jest test `it`
5353
u-desc // Jest test `describe`
5454
u-suite // Jest test suite (including import statements)
55+
u-afterEach // Jest afterEach function
56+
u-beforeEach // Jest beforeEach function
5557
```
5658

5759
## Installation

snippets/snippets.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,26 @@
9797
],
9898
"description": "Jest Test Suite"
9999
},
100+
"Jest afterEach": {
101+
"prefix": "u-afterEach",
102+
"body": [
103+
"afterEach(() => {",
104+
"\t$1",
105+
"});",
106+
""
107+
],
108+
"description": "Jest afterEach: Runs a function after each one of the tests in this file completes"
109+
},
110+
"Jest beforeEach": {
111+
"prefix": "u-beforeEach",
112+
"body": [
113+
"beforeEach(() => {",
114+
"\t$1",
115+
"});",
116+
""
117+
],
118+
"description": "Jest beforeEach: Runs a function before each of the tests in this file runs"
119+
},
100120
"PropTypes": {
101121
"prefix": "u-pt",
102122
"body": [

0 commit comments

Comments
 (0)