Skip to content

Commit 8cc083b

Browse files
committed
fix fat arrow syntax error of including function keyword
1 parent 63f4319 commit 8cc083b

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

packages/mocha-snippets/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,61 +18,61 @@ There you have either the option to show the already installed snippets or insta
1818

1919
### before (`ba`)
2020
```javascript
21-
before(function() => {
21+
before(() => {
2222
$1
2323
});$0
2424
```
2525
### beforeEach (`be`)
2626
```javascript
27-
beforeEach(function() => {
27+
beforeEach(() => {
2828
$1
2929
});$0
3030
```
3131
### After (`aa`)
3232
```javascript
33-
after(function() => {
33+
after(() => {
3434
$1
3535
});$0
3636
```
3737
### afterEach (`ae`)
3838
```javascript
39-
afterEach(function() => {
39+
afterEach(() => {
4040
$1
4141
});$0
4242
```
4343
### suite (`ste`)
4444
```javascript
45-
suite('$1', function() => {
45+
suite('$1', () => {
4646
$2
4747
});$0
4848
```
4949
### suiteSetup (`steup`)
5050
```javascript
51-
suiteSetup(function() => {
51+
suiteSetup(() => {
5252
$1
5353
});$0
5454
```
5555
### setup (`setup`)
5656
```javascript
57-
setup(function() => {
57+
setup(() => {
5858
$1
5959
});$0
6060
```
6161
### suiteTeardown (`stedown`)
6262
```javascript
63-
suiteTeardown(function() => {
63+
suiteTeardown(() => {
6464
$1
6565
});$0
6666
```
6767
### teardown (`teardown`)
6868
```javascript
69-
teardown(function() => {
69+
teardown(() => {
7070
$1
7171
});$0
7272
```
7373
### test (`tst`)
7474
```javascript
75-
test('$1', function() => {
75+
test('$1', () => {
7676
$2
7777
});
7878
```
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
{
22
"before": {
33
"prefix": "ba",
4-
"body": ["before(function() => {", "\t$1", "});$0"],
4+
"body": ["before(() => {", "\t$1", "});$0"],
55
"description": "Before "
66
},
77
"beforeEach": {
88
"prefix": "be",
9-
"body": ["beforeEach(function() => {", "\t$1", "});$0"],
9+
"body": ["beforeEach(() => {", "\t$1", "});$0"],
1010
"description": "Before each"
1111
},
1212
"After": {
1313
"prefix": "aa",
14-
"body": ["after(function() => {", "\t$1", "});$0"],
14+
"body": ["after(() => {", "\t$1", "});$0"],
1515
"description": "After"
1616
},
1717
"afterEach": {
1818
"prefix": "ae",
19-
"body": ["afterEach(function() => {", "\t$1", "});$0"],
19+
"body": ["afterEach(() => {", "\t$1", "});$0"],
2020
"description": "After each"
2121
},
2222
"suite": {
2323
"prefix": "ste",
24-
"body": ["suite('$1', function() => {", "\t$2", "});$0"],
24+
"body": ["suite('$1', () => {", "\t$2", "});$0"],
2525
"description": "Suite"
2626
},
2727
"suiteSetup": {
2828
"prefix": "steup",
29-
"body": ["suiteSetup(function() => {", "\t$1", "});$0"],
29+
"body": ["suiteSetup(() => {", "\t$1", "});$0"],
3030
"description": "Suite setup"
3131
},
3232
"setup": {
3333
"prefix": "setup",
34-
"body": ["setup(function() => {", "\t$1", "});$0"],
34+
"body": ["setup(() => {", "\t$1", "});$0"],
3535
"description": "Setup"
3636
},
3737
"suiteTeardown": {
3838
"prefix": "stedown",
39-
"body": ["suiteTeardown(function() => {", "\t$1", "});$0"],
39+
"body": ["suiteTeardown(() => {", "\t$1", "});$0"],
4040
"description": "Suite teardown"
4141
},
4242
"teardown": {
4343
"prefix": "teardown",
44-
"body": ["teardown(function() => {", "\t$1", "});$0"],
44+
"body": ["teardown(() => {", "\t$1", "});$0"],
4545
"description": "Teardown"
4646
},
4747
"test": {
4848
"prefix": "tst",
49-
"body": ["test('$1', function() => {", "\t$2", "});"],
49+
"body": ["test('$1', () => {", "\t$2", "});"],
5050
"description": "Test"
5151
}
5252
}

0 commit comments

Comments
 (0)