File: es.string.sup.js

package info (click to toggle)
node-core-js 3.33.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,828 kB
  • sloc: javascript: 87,204; makefile: 13
file content (13 lines) | stat: -rw-r--r-- 427 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
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');
  }
});