mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibJS/Tests: Add details for toBeTrue() / toBeFalse() expectation error
This commit is contained in:
parent
f28491dbe7
commit
b221cad659
Notes:
sideshowbarker
2024-07-18 18:11:37 +09:00
1 changed files with 8 additions and 2 deletions
|
@ -174,13 +174,19 @@ class ExpectationError extends Error {
|
|||
|
||||
toBeTrue() {
|
||||
this.__doMatcher(() => {
|
||||
this.__expect(this.target === true);
|
||||
this.__expect(
|
||||
this.target === true,
|
||||
() => `toBeTrue: expected target to be true, got _${String(this.target)}_`
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
toBeFalse() {
|
||||
this.__doMatcher(() => {
|
||||
this.__expect(this.target === false);
|
||||
this.__expect(
|
||||
this.target === false,
|
||||
() => `toBeTrue: expected target to be false, got _${String(this.target)}_`
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue