mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
LibJS: Add the Set built-in object
This commit is contained in:
parent
b17a282b4b
commit
670be04c81
15 changed files with 359 additions and 30 deletions
|
@ -97,6 +97,17 @@ class ExpectationError extends Error {
|
|||
});
|
||||
}
|
||||
|
||||
toHaveSize(size) {
|
||||
this.__expect(
|
||||
typeof this.target.size === "number",
|
||||
() => "toHaveSize: target.size not of type number"
|
||||
);
|
||||
|
||||
this.__doMatcher(() => {
|
||||
this.__expect(Object.is(this.target.size, size));
|
||||
});
|
||||
}
|
||||
|
||||
toHaveProperty(property, value) {
|
||||
this.__doMatcher(() => {
|
||||
let object = this.target;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue