Status

defect
2 years ago
2 years ago

People

(Reporter: nchevobbe, Unassigned)

Tracking

Version 3
Points:
---

Firefox Tracking Flags

(Not tracked)

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.
You need to log in before you can comment on or make changes to this bug.