mirror of
https://github.com/hanzoai/core-js.git
synced 2026-09-24 16:58:15 +00:00
14 lines
427 B
JavaScript
14 lines
427 B
JavaScript
QUnit.test('String#sup', assert => {
|
|
const { sup } = String.prototype;
|
|
assert.isFunction(sup);
|
|
assert.arity(sup, 0);
|
|
assert.name(sup, 'sup');
|
|
assert.looksNative(sup);
|
|
assert.nonEnumerable(String.prototype, 'sup');
|
|
assert.same('a'.sup(), '<sup>a</sup>', 'lower case');
|
|
|
|
if (typeof Symbol == 'function' && !Symbol.sham) {
|
|
assert.throws(() => sup.call(Symbol('sup test')), 'throws on symbol context');
|
|
}
|
|
});
|