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 8, 2025
1 parent 368cf93 commit 8e5f86a
Show file tree
Hide file tree
Showing 141 changed files with 10,768 additions and 8,678 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
run: npm run lint
- name: Transpile code
run: npm run compile
- name: Unit test
run: npm run test:unit:ci
- name: Unit tests
run: npm run test:unit

local-integration-tests:
runs-on: ubuntu-latest
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ jobs:
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: Unit tests
run: npm run test:unit

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

# contains secrets
.env

vitest-report
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/
2 changes: 1 addition & 1 deletion .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright 2024 Splunk Inc.
* Copyright 2025 Splunk Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .size-limit.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright 2024 Splunk Inc.
* Copyright 2025 Splunk Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
20 changes: 19 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright 2024 Splunk Inc.
* Copyright 2025 Splunk Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -222,6 +222,7 @@ export default [
'@typescript-eslint/no-require-imports': 'off',
},
},

{
files: ['examples/todolist/src/**/*.{js,jsx}'],
languageOptions: {
Expand All @@ -230,6 +231,21 @@ export default [
},
},
},

{
files: ['**/*.test.ts'],
languageOptions: {
globals: {
...globals.browser,
},
parser: tseslint.parser,
parserOptions: {
ecmaVersion: 2020,
project: 'packages/web/tsconfig.test.json',
},
},
},

{
ignores: [
'**/dist/',
Expand All @@ -240,6 +256,8 @@ export default [
'.vscode/',
'examples/installing-npm',
'examples/next-ssr-example',
'vitest-report/',
'packages/web/test/',
],
},
]
2 changes: 1 addition & 1 deletion examples/todolist/server/index.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright 2024 Splunk Inc.
* Copyright 2025 Splunk Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/todolist/server/instrumentation.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright 2024 Splunk Inc.
* Copyright 2025 Splunk Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/todolist/src/App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright 2024 Splunk Inc.
* Copyright 2025 Splunk Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/todolist/src/TodoAdd.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright 2024 Splunk Inc.
* Copyright 2025 Splunk Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/todolist/src/TodoEdit.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright 2024 Splunk Inc.
* Copyright 2025 Splunk Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/todolist/src/TodoList.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright 2024 Splunk Inc.
* Copyright 2025 Splunk Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/todolist/src/TodoRow.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright 2024 Splunk Inc.
* Copyright 2025 Splunk Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/todolist/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright 2024 Splunk Inc.
* Copyright 2025 Splunk Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 8e5f86a

Please sign in to comment.