-
-
Notifications
You must be signed in to change notification settings - Fork 5
Replace chai with @nevware21/tripwire for test assertions #430
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
Conversation
…ai dependencies Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
…f expect().to.equal) Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #430 +/- ##
=======================================
Coverage 99.03% 99.03%
=======================================
Files 19 19
Lines 727 727
Branches 183 183
=======================================
Hits 720 720
Misses 7 7 🚀 New features to boost your workflow:
|
…romise.ts, taskScheduler.ts) Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
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.
Pull request overview
This pull request replaces the chai assertion library with @nevware21/tripwire across the entire test suite. The changes remove chai and @types/chai from dependencies and update all test files to use tripwire for assertions.
Changes:
- Removed chai and @types/chai from both root and lib package.json devDependencies
- Updated 13 test files to import from @nevware21/tripwire instead of chai
- Fixed expect syntax to use tripwire's API (expect().to.be.equal() instead of expect().to.equal())
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Removed @types/chai from root package devDependencies |
| lib/package.json | Removed chai and @types/chai, added @nevware21/tripwire ">= 0.1.5 < 2.x", alphabetically sorted devDependencies, removed trailing whitespace |
| lib/test/src/scheduler/scheduler.test.ts | Updated import from chai to @nevware21/tripwire |
| lib/test/src/promise/use.doAwait.test.ts | Updated import from chai to @nevware21/tripwire |
| lib/test/src/promise/use.await.test.ts | Updated import from chai to @nevware21/tripwire |
| lib/test/src/promise/unhandledRejectionEvent.test.ts | Updated import from chai to @nevware21/tripwire |
| lib/test/src/promise/timeoutPromise.test.ts | Updated import from chai to @nevware21/tripwire |
| lib/test/src/promise/sync.promise.test.ts | Updated import from chai to @nevware21/tripwire |
| lib/test/src/promise/idle.promise.test.ts | Updated import from chai to @nevware21/tripwire |
| lib/test/src/promise/event.test.ts | Updated import from chai to @nevware21/tripwire |
| lib/test/src/promise/await.test.ts | Updated import from chai to @nevware21/tripwire, fixed expect syntax to use .to.be.equal() |
| lib/test/src/promise/async.promise.test.ts | Updated import from chai to @nevware21/tripwire |
| lib/test/src/helpers/iterForOfAsync.test.ts | Updated import from chai to @nevware21/tripwire |
| lib/test/src/helpers/doWhileAsync.test.ts | Updated import from chai to @nevware21/tripwire |
| lib/test/src/helpers/arrForEachAsync.test.ts | Updated import from chai to @nevware21/tripwire |
| common/config/rush/npm-shrinkwrap.json | Removed chai and related packages, added @nevware21/tripwire and its dependencies, updated various package versions |
Files not reviewed (1)
- common/config/rush/npm-shrinkwrap.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
nev21
left a comment
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.
Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
|
I'm unable to access the specific review comment at that link. Could you please copy the relevant feedback here or let me know what needs to be addressed? |
nev21
left a comment
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.
see comment about cyclic dependency projects
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.
Pull request overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- common/config/rush/npm-shrinkwrap.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…al packages Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
Addressed in commit 6c2b923 - removed the invalid cyclicDependencyProjects configuration from rush.json. |
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.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- common/config/rush/npm-shrinkwrap.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
nevware21-bot
left a comment
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.
Approved by nevware21-bot
import { assert } from "chai"withimport { assert } from "@nevware21/tripwire"import { assert, expect } from "chai"withimport { assert, expect } from "@nevware21/tripwire"Summary
Successfully replaced all usages of chai with @nevware21/tripwire:
Note on Circular Dependency
The circular dependency between @nevware21/tripwire and @nevware21/ts-async exists but does not prevent the package from working correctly in practice, as tripwire uses ts-async as a runtime dependency while ts-async uses tripwire as a devDependency only for testing.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.