File: es.string.fontcolor.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 (14 lines) | stat: -rw-r--r-- 593 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
QUnit.test('String#fontcolor', assert => {
  const { fontcolor } = String.prototype;
  assert.isFunction(fontcolor);
  assert.arity(fontcolor, 1);
  assert.name(fontcolor, 'fontcolor');
  assert.looksNative(fontcolor);
  assert.nonEnumerable(String.prototype, 'fontcolor');
  assert.same('a'.fontcolor('b'), '<font color="b">a</font>', 'lower case');
  assert.same('a'.fontcolor('"'), '<font color="&quot;">a</font>', 'escape quotes');

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