Skip to content

Commit 31a72fa

Browse files
committed
add tests
1 parent 15c4c52 commit 31a72fa

7 files changed

Lines changed: 639 additions & 13 deletions

File tree

.github/workflows/nodejs.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Node CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version: [20.x]
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Use Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- name: npm install, build, and test
20+
run: |
21+
npm install
22+
./node_modules/.bin/jest --ci
23+
env:
24+
CI: true

jest.config.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@ module.exports = {
22
testMatch: ['<rootDir>/tests/**/(*.)+(spec|test).[jt]s'],
33
testEnvironment: 'node',
44
transform: {
5-
'^.+\\.[jt]s$': 'babel-jest',
5+
'^.+\\.[jt]s$': [
6+
'babel-jest',
7+
{
8+
presets: [
9+
[
10+
'@babel/preset-env',
11+
{
12+
targets: {
13+
node: 'current',
14+
},
15+
},
16+
],
17+
],
18+
},
19+
],
620
},
721
};

package-lock.json

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

0 commit comments

Comments
 (0)