|
@@ -1,10 +1,12 @@
|
|
|
describe("correct behavior", () => {
|
|
|
test("basic functionality", () => {
|
|
|
const s1 = Symbol("baz");
|
|
|
- // const s2 = Symbol.for("qux");
|
|
|
+ const s2 = Symbol.for("qux");
|
|
|
|
|
|
+ // Explicit conversions to string are fine, but implicit toString via concatenation throws.
|
|
|
expect(s1.toString()).toBe("Symbol(baz)");
|
|
|
- // expect(s2.toString()).toBe("Symbol(qux)");
|
|
|
+ expect(String(s1)).toBe("Symbol(baz)");
|
|
|
+ expect(s2.toString()).toBe("Symbol(qux)");
|
|
|
});
|
|
|
});
|
|
|
|