UNPKG

math.acosh

Version:

An ES-spec-compliant Math.acosh shim/polyfill/replacement that works as far down as ES3

29 lines (20 loc) 761 B
'use strict'; require('../auto'); var test = require('tape'); var defineProperties = require('define-properties'); var isEnumerable = Object.prototype.propertyIsEnumerable; var functionsHaveNames = require('functions-have-names')(); var runTests = require('./tests'); test('shimmed', function (t) { t.equal(Math.acosh.length, 1, 'Math.acosh has a length of 1'); t.test('Function name', { skip: !functionsHaveNames }, function (st) { st.equal(Math.acosh.name, 'acosh', 'Math.acosh has name "acosh"'); st.end(); }); t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { et.equal(false, isEnumerable.call(Math, 'acosh'), 'Math.acosh is not enumerable'); et.end(); }); runTests(Math.acosh, t); t.end(); });