Open
Bug 1428779
Opened 7 years ago
Updated 2 years ago
`is` fail to compare Symbols
Categories
(Testing :: Mochitest, defect)
Tracking
(Not tracked)
NEW
People
(Reporter: nchevobbe, Unassigned)
Details
Steps to reproduce:
1. Have a test with the following code:
```js
const s = Symbol();
is(s, s);
```
Expected results:
The assertion is correct, so my test should pass
Actual results:
I get an error when running the test (error from a test I was working on):
TEST-UNEXPECTED-FAIL | devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_eval_in_debugger_stackframe2.js | Uncaught exception - at chrome://mochikit/content/browser-test.js:1269 - TypeError: can't convert symbol to string
Stack trace:
test_is@chrome://mochikit/content/browser-test.js:1269:5
@chrome://mochitests/content/browser/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_eval_in_debugger_stackframe2.js:57:3
Async*Tester_execTest/<@chrome://mochikit/content/browser-test.js:1065:21
Tester_execTest@chrome://mochikit/content/browser-test.js:1056:9
Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:956:9
SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:795:59
Doing
```js
const s = Symbol();
ok(s === s);
```
do not throw and is a workaround, but it would be nice if `is` could work here.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•