-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: extend error message details #112
Conversation
Tests are failling ... |
0db21eb
to
6b4a7be
Compare
Tried replacing How do I get the warn outputs that the spies compares with and how do I use |
@dotpointer calledWithMatch works with a sinon matcher: https://sinonjs.org/releases/latest/matchers/ |
Something like this? Pushed a change to try it but it says |
@dotpointer the documentations says: |
Try |
Pushed a fix with it now. |
5e8c036
to
a4267ed
Compare
@cristinecula @megheaiulian Still failing, also tried this to match anything without progress:
It finds |
@dotpointer |
Tried |
@@ -506,11 +506,11 @@ class CosmozDataNav extends translatable(mixinBehaviors([IronResizableBehavior], | |||
|
|||
if (matches.length === 0) { | |||
// eslint-disable-next-line no-console | |||
console.warn('trying to replace an item that is not in the list', id, item); | |||
console.warn('List item replacement failed, no matching idPath', this.idPath, 'with id', id, 'in the item list', items, 'to replace with item', item); |
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.
This was wrong because console.warn()
was called with multiple arguments ...
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.
This was wrong because
console.warn()
was called with multiple arguments ...
Not sure that I understand here, console.warn()
can take multiple arguments like console.log()
do?
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.
@dotpointer warn was called with multiple arguments, but the tests were asserting that it was called with a single argument.
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.
Aha, thanks.
# [3.2.0](v3.1.0...v3.2.0) (2020-03-17) ### Features * extend error message details ([#112](#112)) ([602ac7c](602ac7c))
🎉 This PR is included in version 3.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Extend error message details so they tell more about what the error is about.
Tell the
idPath
that is being used, a common cause of error is a misconfiguredidPath
(id-path
).Tell the list data, a cause of error is an empty list or one that does not have the expected data.
Reformat the
id
anditem
data presentation so it explains what these are.No issue.