-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
test(__tests__ dir): added vitest and coverage reporting GitHub Actions workflow #8
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@ad1992 Let me know how you like the |
Ohh wow, this PR looks great @KemingHe, very happy to see the tests being added so soon! |
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.
Thanks @KemingHe for the PR ✨
I am thinking should we just add coverage instead of benchmarks ? wdyt ?
This one I mean. - https://github.com/davelosert/vitest-coverage-report-action
|
|
Implemented testing for both cache hit and cache miss cases. done #10
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.
Looks great @KemingHe!
Let's remove caching related stuff from this PR as discussed in the issue
.github/workflows/node-ci.yml
Outdated
@@ -0,0 +1,39 @@ | |||
# ./.github/workflows/node-ci.yml |
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.
let's rename this file to test-coverage-pr.yml
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.
- Renamed in e3264f8.
__tests__/Fuzzy.test.ts
Outdated
import Fuzzy from '../src/Fuzzy'; | ||
|
||
// Fuzzy class test suite. | ||
describe('Fuzzy', () => { |
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.
describe('Fuzzy', () => { | |
describe('Test Fuzzy', () => { |
Let's add a Test
in each describe block just to make it more consistent
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.
- Renamed in e3264f8.
.github/workflows/node-ci.yml
Outdated
# ./.github/workflows/node-ci.yml | ||
# | ||
# Auto CI/CD for Node.js projects using GitHub Actions. | ||
name: Node CI |
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.
name: Node CI | |
name: Test Coverage Pull Request |
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.
- Renamed in e3264f8.
.github/workflows/node-ci.yml
Outdated
workflow_dispatch: | ||
|
||
jobs: | ||
yarn-vitest: |
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.
yarn-vitest: | |
coverage: |
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.
- Renamed in e3264f8.
.github/workflows/node-ci.yml
Outdated
|
||
jobs: | ||
yarn-vitest: | ||
name: Yarn Vitest |
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.
name: Yarn Vitest | |
name: Test Coverage |
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.
- Renamed in e3264f8.
Also @ad1992 , since >90% of our conversation has been about naming preferences, I propose that you provide the exact software specifications in ALL future instances BEFORE I start coding. I can understand that this project is your world and everything and it must be perfect. However, I'm also just an unpaid volunteer and doing this out of my own free will. Warning If the micro-management continues, this will be my last commit to the project. |
Thank you for sharing your concerns. I understand that discussing naming preferences can be annoying, but they are important to ensure consistency, clarity, and maintenance. However not all naming changes are necessary, some are good to have, so feel free to comment where you have a different opinion and we can learn from each other. As mentioned in Readme, this library is at a very early stage and it will take me some time to bring everything in the documentation. I acknowledge and appreciate the voluntary effort you are putting into this project and I am a volunteer as well so I hope we both have the same goals to improve the library and at the same time keep it maintainable as well. From my side, I will try to add details and document as much as possible but as I mentioned it will take me some time as well, until then I will jump in and take care of those undocumented changes as well. I hope we can continue working together smoothly and improve the library :). |
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.
I have removed the caching-related code and tests
Rest all looks good @KemingHe
For some reason, the types for globals aren't working even though specified in tsconfig. Will fix it in separate PR.
Deliverables
Mon. 07/29 Update
@ad1992 Git hard reset to only implement testing, refactored naming 3rd time in e3264f8.
Sun. 07/28 Update@ad1992 , done 10Added query result caching viaprivate cache: { [query: string]: Result };
.Added and maintained 100% test coverage of cache hit and miss.For details, see: c476214Fri. 07/26 Update
@ad1992 , done #3
utils.ts
andFuzzy.ts
.utils.ts
performance (seepackage.json
and__tests__/benchmark.json
)node-ci.yml
to auto yarn install and test per push/PR.MOST IMPORTANT
Screenshot of GitHub (auto-trigger) Actions run output: