Skip to content

Commit 669d849

Browse files
author
vedantoncloud
committed
test: add jest setup, sample test and update ci workflow
1 parent 137adaa commit 669d849

2 files changed

Lines changed: 5 additions & 28 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1 @@
1-
name: CI — Tests
2-
3-
on:
4-
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
8-
9-
jobs:
10-
test:
11-
runs-on: ubuntu-latest
12-
13-
steps:
14-
- name: Checkout repo
15-
uses: actions/checkout@v4
16-
17-
- name: Set up Node
18-
uses: actions/setup-node@v4
19-
with:
20-
node-version: '18'
21-
22-
- name: Install dependencies
23-
run: npm install
24-
25-
- name: Run tests
26-
run: npm test
1+
<PASTE THE YAML CONTENT EXACTLY HERE (between the single quotes) >

test/example.test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
test("Vedant simple test", () => {
2-
expect(2 + 2).toBe(4);
1+
const app = require('../app');
2+
3+
test('basic hello test', () => {
4+
expect(app.hello()).toBe('Hello from MyApp - dev');
35
});

0 commit comments

Comments
 (0)