Skip to content

Commit

Permalink
add jest (#10)
Browse files Browse the repository at this point in the history
* chore: jest config add

* chore: test

* chore: update yml

* chore: deploy cov

* fix: cov
  • Loading branch information
sadnessOjisan authored Sep 29, 2020
1 parent fd73042 commit 77faff1
Show file tree
Hide file tree
Showing 8 changed files with 5,565 additions and 2,667 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist
babel.config.js
webpack.*.js
.eslintrc.js
.eslintrc.js
jest.config.js
8 changes: 8 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,13 @@ jobs:
registry-url: "https://registry.npmjs.org"
- name: install
run: npm install
- name: typecheck
run: npm run typecheck
- name: lint
run: npm run lint
- name: format
run: npm run format
- name: test
run: npm run test
- name: build
run: npm run build:dev
6 changes: 4 additions & 2 deletions .github/workflows/prd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: publish
name: PRD
on:
push:
tags:
Expand All @@ -25,8 +25,10 @@ jobs:
run: npm run lint
- name: format
run: npm run format
- name: test
run: npm run test
- name: build
run: npm run build:prd
run: npm run build:stg
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/stg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ jobs:
run: npm run lint
- name: format
run: npm run format
- name: test
run: npm run test:cov
- name: build
run: npm run build:prd
- name: STG Deploy
- name: Deploy Coverage Report
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_dir: ./coverage
8 changes: 8 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html

module.exports = {
clearMocks: true,
coverageDirectory: "coverage",
testEnvironment: "jsdom",
};
Loading

1 comment on commit 77faff1

@vercel
Copy link

@vercel vercel bot commented on 77faff1 Sep 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.