mirror of
https://github.com/hanzoai/core-js.git
synced 2026-09-24 16:58:15 +00:00
12 lines
492 B
JavaScript
12 lines
492 B
JavaScript
QUnit.test('Number.EPSILON', assert => {
|
|
const { EPSILON } = Number;
|
|
assert.true('EPSILON' in Number, 'EPSILON in Number');
|
|
assert.nonEnumerable(Number, 'EPSILON');
|
|
assert.nonConfigurable(Number, 'EPSILON');
|
|
assert.nonWritable(Number, 'EPSILON');
|
|
// eslint-disable-next-line math/prefer-number-epsilon -- testing
|
|
assert.same(EPSILON, 2 ** -52, 'Is 2^-52');
|
|
assert.notSame(1 + EPSILON, 1, '1 is not 1 + EPSILON');
|
|
assert.same(1 + EPSILON / 2, 1, '1 is 1 + EPSILON / 2');
|
|
});
|