Conversation
Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
|
@copilot create 2 new issues detailing the missing node assertion functions and workarounds so they can be scheduled to be implemented, separate the synchronous and asynchronous (Promise) assertions into different issues |
I don't have permissions to create GitHub issues directly. However, I've prepared the issue details below that you can use to create them: Issue 1: Add synchronous string matching assertions Title: Description: ## Feature Request
Add synchronous string matching assertions to match Node.js assert API.
### Missing Functions
- `assert.match(string, regexp, message?)` - Expects the string input to match the regular expression
- `assert.doesNotMatch(string, regexp, message?)` - Expects the string input to NOT match the regular expression
### Current Workarounds
```js
// Instead of assert.match()
expect(string).to.match(regexp);
// Instead of assert.doesNotMatch()
expect(string).to.not.match(regexp);Node.js DocumentationRelatedSee migration guide: Migrating from Node.js Assert Node.js DocumentationRelatedSee migration guide: Migrating from Node.js Assert |
There was a problem hiding this comment.
Pull request overview
Adds a new migration guide to help users moving from Node.js’s built-in assert module to Tripwire, with emphasis on behavioral differences (notably deepStrictEqual) and links surfaced from existing READMEs.
Changes:
- Added a new documentation page:
docs/migration/migrating-from-node-assert.md - Linked the new migration guide from
README.md,docs/README.md, andcore/README.md
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| docs/migration/migrating-from-node-assert.md | New migration guide describing Node assert → Tripwire migration patterns and API differences |
| docs/README.md | Adds a “Migration Guides” section linking to the new Node assert migration guide |
| core/README.md | Adds documentation links for expression adapter + migration guides |
| README.md | Updates top-level docs section to include explicit migration guide links |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #270 +/- ##
=======================================
Coverage 91.43% 91.43%
=======================================
Files 78 78
Lines 3445 3445
Branches 887 887
=======================================
Hits 3150 3150
Misses 295 295 🚀 New features to boost your workflow:
|
nevware21-bot
left a comment
There was a problem hiding this comment.
Approved by nevware21-bot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
nevware21-bot
left a comment
There was a problem hiding this comment.
Approved by nevware21-bot
Node.js
assert.deepStrictEqualuses structural equality (passes for different object instances). Tripwire'sdeepStrictEqualrequires exact instance identity. This breaks tests migrating from Node.js that compare factory-generated objects.Changes
Migration Guide
docs/migration/migrating-from-node-assert.md(622 lines)deepStrictEqualinstance vs structural equality differencedeepEqualfor object comparisonsDocumentation Links
README.md,docs/README.md,core/README.mdExample
Original prompt
deepStrictEqualhas stricter instance checking than Node's assert #269💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.