Skip to content

Commit 5f8b024

Browse files
test: introduce unit tests (#55)
* unit tests * unit tests * introduce unit test for elements * test: add unit tests * add unit tests to github actions * add separate pipeline
1 parent c943ac1 commit 5f8b024

File tree

7 files changed

+27852
-27733
lines changed

7 files changed

+27852
-27733
lines changed

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
branches:
7+
- main
8+
9+
name: Tests
10+
11+
jobs:
12+
UnitTest:
13+
runs-on: macos-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
- run: npm install
20+
name: Install dependencies
21+
- run: npm run build
22+
name: Build
23+
- run: npm run test
24+
name: Unit Test

.mocharc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
extension: ['ts'],
3+
spec: 'test/**/element.specs.ts',
4+
require: 'ts-node/register',
5+
timeout: 20000,
6+
};

0 commit comments

Comments
 (0)