Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hideya committed Jan 6, 2025
1 parent 8a82837 commit 2d127bc
Show file tree
Hide file tree
Showing 9 changed files with 4,054 additions and 756 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci
- run: npm run lint
- run: npm test
- run: npm run build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

node_modules/
dist/
coverage/
.DS_Store
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/node_modules
/src
/tests
/coverage
tsconfig.json
eslint.config.js
8 changes: 8 additions & 0 deletions .replit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
modules = ["nodejs-20"]
run = "npm run watch"

[nix]
channel = "stable-24_05"

[deployment]
run = ["sh", "-c", "npm run watch"]
10 changes: 10 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

export default {
preset: 'ts-jest',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
testMatch: ['**/tests/**/*.test.ts'],
};
Loading

0 comments on commit 2d127bc

Please sign in to comment.