mirror of
https://github.com/hanzoai/core-js.git
synced 2026-09-24 16:58:15 +00:00
14 lines
434 B
JavaScript
14 lines
434 B
JavaScript
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');
|
|
}
|
|
});
|