Skip to content

Commit

Permalink
test: update test code
Browse files Browse the repository at this point in the history
  • Loading branch information
code-xhyun committed May 8, 2024
1 parent 844c2c1 commit c2af50a
Show file tree
Hide file tree
Showing 15 changed files with 5,580 additions and 3,354 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
},
"overrides": [
{
"files": ["*.test.ts"],
"files": ["*.spec.ts"],
"env": {
"mocha": true
"jest": true
},
"rules": {
"@typescript-eslint/no-unused-expressions": "off",
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test Coverage Comment
on:
pull_request:
types: [opened, reopened,assigned,edited,review_requested]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: npm ci

- name: Run tests
run: |
npx jest --coverage --coverageReporters json-summary
- name: Jest Coverage Comment
uses: MishaKav/jest-coverage-comment@main
with:
junitxml-title: Pulse Test Report
junitxml-path: ./junit.xml
junitxml-title: JUnit
13 changes: 0 additions & 13 deletions .mocharc.jsonc

This file was deleted.

20 changes: 20 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { Config } from '@jest/types';
// Sync object
const config: Config.InitialOptions = {
verbose: true,
preset: 'ts-jest',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
transform: {
'^.+\\.ts?$': 'ts-jest',
},
globals: {
'ts-jest': {
tsconfig: {
allowJs: true,
},
},
},
reporters: ['default', 'jest-junit'],
};
export default config;
Loading

0 comments on commit c2af50a

Please sign in to comment.