-
Notifications
You must be signed in to change notification settings - Fork 190
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
Port debugger tests to new test harness #592
Conversation
dee0225
to
8ba6ada
Compare
@chadhietala would appreciate 👀 on this. Specially around how to best DRY things up with the new harness. |
} while (!iteratorResult.done); | ||
this.assertStableRerender(); | ||
this.assert.equal(callbackExecuted, 1); | ||
this.assertHTML('true'); |
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.
You can ✂️ this line as L24 is checking the same thing.
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.
Thank you! Looking really good! Just missed a couple asserts and you can also delete some code 😄
}; | ||
this.rerender(expectedContext); | ||
this.assert.equal(callbackExecuted, 2); | ||
this.assertHTML('false'); |
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.
Can you add this.assertStableNodes()
on the next line
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.
Had failing specs as this.snapshot
is outdated in assertStableNodes()
after the rerender
glimmer-vm/packages/@glimmer/test-helpers/lib/abstract-test-case.ts
Lines 522 to 526 in aa0ddc6
let { oldSnapshot, newSnapshot } = normalize( | |
this.snapshot, | |
this.takeSnapshot(), | |
except | |
); |
I resorted to calling assertStableRerender
to have a new snapshot taken but feel that it isn't the right thing to do. Would appreciate some input regarding this @chadhietala 🙇
}; | ||
this.rerender(expectedContext); | ||
this.assert.equal(callbackExecuted, 3); | ||
this.assertHTML('true'); |
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.
Same comment about adding this.assertStableNodes()
iteratorResult = templateIterator.next(); | ||
} while (!iteratorResult.done); | ||
this.assertStableRerender(); | ||
this.assert.equal(callbackExecuted, 1); |
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.
No need for this guy ✂️
QUnit.test('can get locals', assert => { | ||
let template = compile(`{{#with foo as |bar|}}{{debugger}}{{/with}}`); | ||
this.assertStableRerender(); | ||
this.assert.equal(callbackExecuted, 1); |
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.
✂️ 70 & 71
}; | ||
this.rerender(expectedContext); | ||
this.assert.equal(callbackExecuted, 2); | ||
this.assertHTML('false'); |
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.
Add this.assertStableNodes()
}; | ||
this.rerender(expectedContext); | ||
this.assert.equal(callbackExecuted, 3); | ||
this.assertHTML('true'); |
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.
Add this.assertStableNodes()
8ba6ada
to
ae33499
Compare
@chadhietala Done! Thanks for the quick review ⚡️ |
@sduquej there seems to be a couple of failing tests:
|
ae33499
to
e3b9a60
Compare
61f7897
to
67df32c
Compare
For #561