Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manually test number format specifiers applied to Symbols
Adds manual tests that apply number format specifiers on Symbols for each Console method that uses Formatter. This also updates a previous test of the same nature to call console.groupEnd after calls to group() and groupCollapsed() to clean up the console output and prevent unnecessary nesting. See whatwg/console#113.
- Loading branch information
1 parent
94c053e
commit 13436eb
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
console/console-number-format-specifiers-symbol-manual.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Console Number Format Specifiers on Symbols</title> | ||
<meta name="author" title="Dominic Farolino" href="mailto:domfarolino@gmail.com"> | ||
<meta name="assert" content="Console format specifiers on Symbols"> | ||
<link rel="help" href="https://console.spec.whatwg.org/#formatter"> | ||
</head> | ||
<body> | ||
<p>Open the console inside the developer tools. It should contain 15 lines, each of which are:</p> | ||
<p><code>NaN</code></p> | ||
|
||
<script> | ||
const methods = ["log", "dirxml", "trace", "group", "groupCollapsed"]; | ||
|
||
for (method of methods) { | ||
console[method]("%i", Symbol.for("description")); | ||
if (method == "group" || method == "groupCollapsed") console.groupEnd(); | ||
console[method]("%d", Symbol.for("description")); | ||
if (method == "group" || method == "groupCollapsed") console.groupEnd(); | ||
console[method]("%f", Symbol.for("description")); | ||
if (method == "group" || method == "groupCollapsed") console.groupEnd(); | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters