Skip to content

Commit 88b4a97

Browse files
committed
ci: Add a GitHub workflow for frontend testing #7
1 parent 47259c1 commit 88b4a97

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 'Frontend tests'
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
unit-tests:
8+
runs-on: ubuntu-24.04
9+
defaults:
10+
run:
11+
working-directory: frontend
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v5
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: ${{vars.NODE_VERSION}}
20+
21+
- name: Npm install
22+
run: npm ci
23+
24+
- name: Run unit tests
25+
run: npm test

frontend/src/app/app.component.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { TestBed } from '@angular/core/testing';
22
import { AppComponent } from './app.component';
33
import { RouterModule } from '@angular/router';
4+
jest.mock('@puzzleitc/puzzle-shell', () => jest.fn());
45

56
describe('AppComponent', () => {
67
beforeEach(async() => {

0 commit comments

Comments
 (0)