Skip to content

Commit bb87311

Browse files
authored
test: use Jest for unit testing (#637)
* jest jest jest * jest * jest * jest * jest * jest * jest * jest * jest * jest * jest * jest
1 parent 1ed4786 commit bb87311

File tree

107 files changed

+9895
-7965
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+9895
-7965
lines changed

.babelrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"presets": [
3+
[
4+
"env",
5+
{
6+
"modules": false
7+
}
8+
]
9+
],
10+
"env": {
11+
"test": {
12+
"presets": [
13+
[
14+
"env",
15+
{
16+
"targets": {
17+
"node": "current"
18+
}
19+
}
20+
]
21+
]
22+
}
23+
}
24+
}

.github/workflows/main.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ jobs:
1111
- uses: actions/checkout@v2
1212
- uses: c-hive/gha-yarn-cache@v2
1313
- run: yarn --frozen-lockfile
14-
env:
15-
PUPPETEER_SKIP_DOWNLOAD: true
1614
- name: Lint
1715
run: npm run lint
1816
test:
@@ -27,14 +25,12 @@ jobs:
2725
uses: coverallsapp/github-action@master
2826
with:
2927
github-token: ${{ secrets.GITHUB_TOKEN }}
30-
path-to-lcov: ./test/coverage/lcov.info
28+
path-to-lcov: ./coverage/lcov.info
3129
dist:
3230
runs-on: ubuntu-latest
3331
steps:
3432
- uses: actions/checkout@v2
3533
- uses: c-hive/gha-yarn-cache@v2
3634
- run: yarn --frozen-lockfile
37-
env:
38-
PUPPETEER_SKIP_DOWNLOAD: true
3935
- name: Build dist
4036
run: npm run dist

.github/workflows/publish_github.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ jobs:
2121
FILE: package.json
2222
- uses: c-hive/gha-yarn-cache@v2
2323
- run: yarn --frozen-lockfile
24-
env:
25-
PUPPETEER_SKIP_DOWNLOAD: true
2624
- name: Build dist
2725
run: npm run dist
2826
- run: echo //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }} >> .npmrc

.github/workflows/publish_npm.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ jobs:
1616
node-version: '12.x'
1717
registry-url: 'https://registry.npmjs.org'
1818
- run: yarn --frozen-lockfile
19-
env:
20-
PUPPETEER_SKIP_DOWNLOAD: true
2119
- name: Build dist
2220
run: npm run dist
2321
- name: Publish NPM

.github/workflows/publish_release.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
ref: dev
1616
- uses: c-hive/gha-yarn-cache@v2
1717
- run: yarn --frozen-lockfile
18-
env:
19-
PUPPETEER_SKIP_DOWNLOAD: true
2018
- name: Build dist
2119
run: npm run dist
2220
- name: Changelog

.gitignore

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
.DS_Store
22
node_modules/
3-
npm-debug.log
4-
yarn-error.log
5-
test/coverage
6-
test/e2e/reports
7-
selenium-debug.log
8-
*.iml
9-
.idea/
3+
*.log
4+
coverage
105
*.gz
116
dist-docs/
12-
dist/
7+
dist/

.idea/.gitignore

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jsLinters/eslint.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)