Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/add_wf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run unit test

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.14
- uses: actions/cache@v3
with:
path: ./nodejs/node_modules
key: nodejs-${{ hashFiles('./nodejs/package-lock.json') }}
- name: Install packages
run: npm install
working-directory: ./nodejs
- name: Run test
run: npm test run
working-directory: ./nodejs
8 changes: 4 additions & 4 deletions nodejs/add.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { add } from './add';
import { add } from "./add";

test('add test', () => {
expect(add(10, 15)).toBe(25)
})
test("add test", () => {
expect(add(10, 15)).toBe(25);
});