File: es.string.bold.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-- 434 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
QUnit.test('String#bold', assert => {
  const { bold } = String.prototype;
  assert.isFunction(bold);
  assert.arity(bold, 0);
  assert.name(bold, 'bold');
  assert.looksNative(bold);
  assert.nonEnumerable(String.prototype, 'bold');
  assert.same('a'.bold(), '<b>a</b>', 'lower case');

  if (typeof Symbol == 'function' && !Symbol.sham) {
    assert.throws(() => bold.call(Symbol('bold test')), 'throws on symbol context');
  }
});