Skip to content

Commit 75c469e

Browse files
committed
fix: update snapshot tests
1 parent 0e692aa commit 75c469e

File tree

4 files changed

+16
-6685
lines changed

4 files changed

+16
-6685
lines changed

.github/workflows/test.yml

+6-18
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,16 @@ jobs:
1414
- name: Check out Git repository
1515
uses: actions/checkout@v2
1616

17-
- name: Install Node.js, NPM and Yarn
17+
- name: Install Node.js, NPM
1818
uses: actions/setup-node@v1
1919
with:
20-
node-version: 14
20+
node-version: 16
2121

22-
- name: Get yarn cache directory path
23-
id: yarn-cache-dir-path
24-
run: echo "::set-output name=dir::$(yarn cache dir)"
22+
- name: npm install
23+
run: npm ci
2524

26-
- uses: actions/cache@v2
27-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
28-
with:
29-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
30-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31-
restore-keys: |
32-
${{ runner.os }}-yarn-
33-
34-
- name: yarn install
35-
run: yarn --frozen-lockfile
36-
37-
- name: yarn test
25+
- name: npm test
3826
env:
3927
CLIENT_ID: ${{ secrets.CLIENT_ID }}
4028
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
41-
run: yarn test
29+
run: npm test

package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
"homepage": "https://github.com/amilajack/eslint-plugin-flowtype-errors#readme",
88
"main": "index.js",
99
"scripts": {
10-
"flow": "flow",
1110
"build": "cross-env NODE_ENV=production babel src --out-dir dist",
1211
"lint": "eslint --cache .",
1312
"prettier": "prettier --single-quote --write \"./src/*.js\"",
14-
"preversion": "yarn build",
15-
"spec": "yarn build && jest",
16-
"test": "yarn flow && yarn lint && yarn spec"
13+
"preversion": "npm run build",
14+
"spec": "npm run build && jest",
15+
"test": "flow && npm run lint && npm run spec"
1716
},
1817
"repository": "https://github.com/amilajack/eslint-plugin-flowtype-errors",
1918
"jest": {
@@ -137,7 +136,7 @@
137136
},
138137
"husky": {
139138
"hooks": {
140-
"pre-commit": "yarn test"
139+
"pre-commit": "npm test"
141140
}
142141
}
143142
}

test/__snapshots__/format.spec.js.snap

+6-6
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,18 @@ exports[`Check codebases html-support - eslint should give expected output 1`] =
6565
5:1 error Parsing error: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?
6666
6767
3 | </template>
68-
4 |
68+
4 |
6969
> 5 | <script>
7070
| ^
7171
6 | // @flow
72-
7 |
72+
7 |
7373
8 | import B from \\"./b.vue\\";
7474
7575
./b.vue
7676
5:1 error Parsing error: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?
7777
7878
3 | </template>
79-
4 |
79+
4 |
8080
> 5 | <script>
8181
| ^
8282
6 | export default {};
@@ -112,13 +112,13 @@ exports[`Check codebases project-1 - eslint should give expected output 1`] = `
112112
12:6 error Cannot resolve name \`x\`. [cannot-resolve-name] flowtype-errors/show-errors
113113
114114
./3.example.js
115-
18:7 error Parsing error: Identifier 'who' has already been declared
115+
18:7 error Parsing error: Identifier 'who' has already been declared.
116116
117117
16 | var str: number = 'hello world!';
118-
17 |
118+
17 |
119119
> 18 | const who = {};
120120
| ^
121-
19 |
121+
19 |
122122
20 | moo(str + who);
123123
21 |
124124

0 commit comments

Comments
 (0)