| function shouldThrow(func, errorMessage) { |
| throw new Error('not thrown'); |
| if (String(error) !== errorMessage) |
| throw new Error(`bad error: ${String(error)}`); |
| var symbol = Symbol("Cocoa"); |
| }, `TypeError: Cannot convert a symbol to a string`); |
| }, `TypeError: Cannot convert a symbol to a number`); |
| Symbol.keyFor("Cappuccino"); |
| }, `TypeError: Symbol.keyFor requires that the first argument be a symbol`); |
| Symbol.prototype.toString.call(null); |
| }, `TypeError: Symbol.prototype.toString requires that |this| be a symbol or a symbol object`); |
| Symbol.prototype.toString.call({}); |
| }, `TypeError: Symbol.prototype.toString requires that |this| be a symbol or a symbol object`); |
| Symbol.prototype.valueOf.call(null); |
| }, `TypeError: Symbol.prototype.valueOf requires that |this| be a symbol or a symbol object`); |
| Symbol.prototype.valueOf.call({}); |
| }, `TypeError: Symbol.prototype.valueOf requires that |this| be a symbol or a symbol object`); |