Skip to content

Commit

Permalink
chore: refactor unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Joozty committed Jan 30, 2025
1 parent f0360d7 commit 078d8c8
Show file tree
Hide file tree
Showing 42 changed files with 11,732 additions and 9,144 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/ci-main.yml

This file was deleted.

21 changes: 17 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Continuous Integration
on:
pull_request:
types: [opened, synchronize]
push:
branches: [main]
tags: [v*]

permissions: read-all

jobs:
Expand All @@ -10,21 +15,29 @@ jobs:
steps:
- name: Checkout
uses: actions/[email protected]

- name: Setup
uses: ./.github/actions/setup

- run: npm run version:check

- name: Size check
run: npm run size-limit

- name: Lint code
run: npm run lint

- name: Lint docs
run: npm run lint:markdown

- name: Transpile code
run: npm run compile
- name: Unit test
run: npm run test:unit:ci
- name: Unit test (nodejs)
run: npm run test:unit:ci-node

- name: Install playwright
uses: ./.github/actions/install-playwright

- name: Unit tests
run: npm run test:unit

playwright:
uses: ./.github/workflows/tests.yml
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ tests_output/

# contains secrets
.env

vitest-report
__screenshots__
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
git-tag-version = false
registry=https://registry.npmjs.org/
15 changes: 15 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,19 @@ export default [
},
},
},
{
files: ['**/*.test.ts'],
languageOptions: {
globals: {
...globals.browser,
},
parser: tseslint.parser,
parserOptions: {
ecmaVersion: 2020,
project: 'tsconfig.eslint.json',
},
},
},
{
ignores: [
'**/dist/',
Expand All @@ -240,6 +253,8 @@ export default [
'.vscode/',
'examples/installing-npm',
'examples/next-ssr-example',
'vitest-report',
'packages/web/test',
],
},
]
Loading

0 comments on commit 078d8c8

Please sign in to comment.