Skip to content

Commit

Permalink
test: update console wpt
Browse files Browse the repository at this point in the history
PR-URL: #55192
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
  • Loading branch information
RedYetiDev authored and ruyadorno committed Nov 27, 2024
1 parent 07c2fb2 commit 0e873c3
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/wpt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Last update:

- common: https://github.com/web-platform-tests/wpt/tree/dbd648158d/common
- compression: https://github.com/web-platform-tests/wpt/tree/da8d6860b2/compression
- console: https://github.com/web-platform-tests/wpt/tree/767ae35464/console
- console: https://github.com/web-platform-tests/wpt/tree/e48251b778/console
- dom/abort: https://github.com/web-platform-tests/wpt/tree/0143fe244b/dom/abort
- dom/events: https://github.com/web-platform-tests/wpt/tree/0a811c5161/dom/events
- encoding: https://github.com/web-platform-tests/wpt/tree/1ac8deee08/encoding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,25 @@
console.count();
console.countReset();
console.count();
console.countReset();

console.count(undefined);
console.countReset(undefined);
console.count(undefined);
console.countReset(undefined);

console.count("default");
console.countReset("default");
console.count("default");
console.countReset("default");

console.count({toString() {return "default"}});
console.countReset({toString() {return "default"}});
console.count({toString() {return "default"}});
console.countReset({toString() {return "default"}});

console.count("a label");
console.countReset();
console.countReset("a label");
console.count("a label");

console.countReset("b"); // should produce a warning
Expand Down
8 changes: 8 additions & 0 deletions test/fixtures/wpt/console/console-log-large-array.any.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// META: global=window,dedicatedworker,shadowrealm
"use strict";
// https://console.spec.whatwg.org/

test(() => {
console.log(new Array(10000000).fill("x"));
console.log(new Uint8Array(10000000));
}, "Logging large arrays works");
10 changes: 10 additions & 0 deletions test/fixtures/wpt/console/console-log-symbol.any.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// META: global=window,dedicatedworker,shadowrealm
"use strict";
// https://console.spec.whatwg.org/

test(() => {
console.log(Symbol());
console.log(Symbol("abc"));
console.log(Symbol.for("def"));
console.log(Symbol.isConcatSpreadable);
}, "Logging a symbol doesn't throw");
2 changes: 1 addition & 1 deletion test/fixtures/wpt/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"path": "compression"
},
"console": {
"commit": "767ae354642bee1e4d90b28df4480475b9260e14",
"commit": "e48251b77834f9689e9df3f49b93b3387dee72d6",
"path": "console"
},
"dom/abort": {
Expand Down

0 comments on commit 0e873c3

Please sign in to comment.