-
Notifications
You must be signed in to change notification settings - Fork 11
WIP - test: Add Vitest test suite. #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
junhaoliao
wants to merge
62
commits into
y-scope:main
Choose a base branch
from
junhaoliao:vitest
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 37 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
10088e6
build(deps): Upgrade CLP to de9fc08; Adapt to upstream API changes in…
junhaoliao fe1d168
build: Remove unused FetchContent and fmt include path from CMakeList…
junhaoliao fc61a0f
test: Add Vitest test suite.
junhaoliao 841a644
chore: Fix newline at end of .gitignore file
junhaoliao 6d6cedb
style: Add missing blank line before export in eslint.config.mjs.
junhaoliao a37dec1
ci: Add GitHub Actions test workflow for Vitest suite.
junhaoliao e76ba2e
build: Add default task and build dependency to test taskfile.
junhaoliao a4fc2ce
ci: Add path filters; Pin checkout action; Remove redundant build step.
junhaoliao 2db06cc
test: Add IR stream type constants; Import constants directly; Test a…
junhaoliao b84a27e
build: Update tsconfig.json to follow @tsconfig/node22 base.
junhaoliao 45a9961
test: Refactor log event timestamp extraction and reorder imports in …
junhaoliao d221203
build, test: Update lint script to include TypeScript check; refactor…
junhaoliao a222f2e
build, test: Split test utilities into browser and Node.js versions; …
junhaoliao c981e16
ci: Widen vitest config glob in CI monitored paths.
junhaoliao 5638636
test: Add null checks for filtered log event maps in stream reader tests
junhaoliao 5cda09f
test: Replace null checks with `assertNonNull` in stream reader tests
junhaoliao 47ee14d
build: Remove unused TypeScript config overrides in ESLint configuration
junhaoliao ef627f5
build: Replace `postinstall` with `prepare` for Playwright installation
junhaoliao 954349f
test: Set `testTimeout` for browser and Node.js projects otherwise th…
junhaoliao 8f2d14c
test: Update KQL filtering tests to assert specific event counts
junhaoliao aa2598b
test: Update IR stream reader tests to use specific event counts and …
junhaoliao 9668eb8
test: Remove redundant null check tests in IR stream reader test files
junhaoliao 51b562a
test: Remove `OUT_OF_BOUNDS_OFFSET` constant and update related strea…
junhaoliao a85f259
test: Fix `decodeRange` argument order and update constants in stream…
junhaoliao a6b9920
test: Replace `npm install` with `npm clean-install` in test taskfile
junhaoliao cb4aecf
test: Consolidate test utilities and remove redundant configurations
junhaoliao 6d5cb29
test: Refactor IR stream reader tests to use shared `describeCommonTe…
junhaoliao 5f663b6
test: Reformat test setup comment for improved readability
junhaoliao 35ae92a
chore: Remove extra blank lines from deps.yaml file.
junhaoliao dd34d40
chore: Refactor node-modules task and update dependencies in taskfiles.
junhaoliao a578259
ci(tests): Install Playwright browsers and dependencies before runnin…
junhaoliao c36a2ec
fix(test): Depend on package task to ensure dist/ directory exists
junhaoliao cd5b061
ci(tests): Remove Playwright installation step from workflow
junhaoliao 209547f
chore: Update lint script to use lint:check:js
junhaoliao d6411ce
chore: Update `moduleResolution` to `nodenext` in tsconfig.json
junhaoliao 625435f
chore: Add `:package` dependency to JS lint tasks
junhaoliao 3ddef9d
chore: Update tsconfig includes to fix test configuration paths
junhaoliao 70f27a0
move `node-modules` task to Taskfile.yml
junhaoliao 9535dea
chore: Add support for passing CLI arguments to JS test command
junhaoliao 54ceb4a
chore: Revise tsconfig compiler options for stricter type checking an…
junhaoliao 0290593
chore: Add newline to tsconfig.json to follow EOF standards
junhaoliao 3bcfb9f
chore: Bump @types/node to ^22.19.9
junhaoliao cad015f
update lock file
junhaoliao fb81f1a
chore: Replace `:clp-ffi-js` dependency with `:package` in JS test co…
junhaoliao f46eb34
Merge branch 'main' into vitest
Bill-hbrhbr bff0ff2
Merge fixes
Bill-hbrhbr ff3033e
Merge branch 'main' into vitest
Bill-hbrhbr 0fbf92c
feat: Add a reader for single file archives.
hoophalab 9789b28
new clp commit
hoophalab fcaf511
remove comment
hoophalab 9b83fe7
add test files
hoophalab 5e4f579
Update to use result based API
Bill-hbrhbr 7f5bd78
upstream
hoophalab 2d52229
deps
hoophalab 8abbf1b
revert deps
hoophalab 54f4925
use short commit id; remove duplicated cmake flags
hoophalab 46b6bcb
comments
hoophalab 1db28ca
second pass
hoophalab 6ca13b4
Move binding type registration into central module as well
Bill-hbrhbr df798da
lint fixes clang-tidy
Bill-hbrhbr ba8947f
minor touch up
Bill-hbrhbr 5ea0295
Merge branch 'initial-sfa-pr' into vitest
Bill-hbrhbr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: "tests" | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: &monitored_paths | ||
| - ".github/workflows/tests.yaml" | ||
| - "CMakeLists.txt" | ||
| - "package.json" | ||
| - "package-lock.json" | ||
| - "src/**" | ||
| - "taskfiles/**" | ||
| - "Taskfile.yml" | ||
| - "test/**" | ||
| - "tsconfig.json" | ||
| - "vitest.config.ts" | ||
| push: | ||
| paths: *monitored_paths | ||
| schedule: | ||
| # Run daily at 00:15 UTC (the 15 is to avoid periods of high load) | ||
| - cron: "15 0 * * *" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| concurrency: | ||
| group: "${{github.workflow}}-${{github.ref}}" | ||
|
|
||
| # Cancel in-progress jobs for efficiency | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| tests: | ||
| runs-on: "ubuntu-24.04" | ||
| steps: | ||
| - uses: "actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8" # v6.0.1 | ||
| with: | ||
| submodules: "recursive" | ||
|
|
||
| - name: "Install task" | ||
| run: "npm install -g @go-task/cli@3.44.0" | ||
|
|
||
| - name: "Log tool versions" | ||
| run: |- | ||
| cmake --version | ||
| md5sum --version | ||
| node --version | ||
| npm --version | ||
| task --version | ||
|
|
||
| - run: "task test:js" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import CommonConfig from "eslint-config-yscope/CommonConfig.mjs"; | ||
| import StylisticConfigArray from "eslint-config-yscope/StylisticConfigArray.mjs"; | ||
| import TsConfigArray from "eslint-config-yscope/TsConfigArray.mjs"; | ||
|
|
||
|
|
||
| const EslintConfig = [ | ||
| { | ||
| ignores: [ | ||
| "build/", | ||
| "dist/", | ||
| "node_modules/", | ||
| ], | ||
| }, | ||
| CommonConfig, | ||
| ...TsConfigArray, | ||
| ...StylisticConfigArray, | ||
| ]; | ||
|
|
||
|
|
||
| export default EslintConfig; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Consider widening the vitest config path pattern for consistency.
The
tsconfig.jsonusesvitest.*config.tsto match multiple potential vitest config files. If additional vitest configs (e.g.,vitest.browser.config.ts) are expected, consider updating the path filter tovitest*config.tsorvitest*.config.tsto catch all variants.💡 Suggested change (if broader matching is intended)
📝 Committable suggestion
🤖 Prompt for AI Agents