Phase 1 PWA: prayer times, qibla, quran, hijri, tasbih, 99 names

This commit is contained in:
Hermes Bot
2026-08-06 11:55:47 +08:00
parent 4def05d0ef
commit 0d37e7ec1e
10869 changed files with 959465 additions and 18 deletions
+43
View File
@@ -0,0 +1,43 @@
'use strict';
var test = require('tape');
var v = require('es-value-fixtures');
var Get = require('../Get');
test('Get', function (t) {
t['throws'](
// @ts-expect-error
function () { return Get('a', 'a'); },
TypeError,
'Throws a TypeError if `O` is not an Object'
);
t['throws'](
// @ts-expect-error
function () { return Get({ 7: 7 }, 7); },
TypeError,
'Throws a TypeError if `P` is not a property key'
);
var sentinel = {};
t.test('Symbols', { skip: !v.hasSymbols }, function (st) {
var sym = Symbol('sym');
var obj = /** @type {Record<symbol, unknown>} */ ({});
obj[sym] = sentinel;
st.equal(Get(obj, sym), sentinel, 'returns property `P` if it exists on object `O`');
st.end();
});
t.equal(Get({ a: sentinel }, 'a'), sentinel, 'returns property `P` if it exists on object `O`');
t.equal(
// @ts-expect-error
Get({}, 'a'),
undefined,
'returns undefined if property `P` does not exist on object `O`'
);
t.end();
});