574a16d9fa
Snapshot of the working tree before cleanup. Captures: - Keysat licensing: server/license.js, /api/license/* endpoints in server/index.js, activation modal in public/index.html, embedded Ed25519 issuer key (assets/issuer.pub). - StartOS 0.4 expansion: setApiKey action, version files v0.1.1 through v0.1.15, file-models/config.json.ts, manifest updates. - Self-hosted registry server (startos-registry/). - Build/deploy scripts (bin/bump-version.sh, bin/deploy.sh, vendored yt-dlp binary), .gitignore, .deploy.env.example. - Recent design docs (KEYSAT_INTEGRATION.md, UPGRADE-DESIGN.md) — retained here so they remain recoverable when removed in the follow-up cleanup commit.
37 lines
656 B
JavaScript
37 lines
656 B
JavaScript
'use strict';
|
|
|
|
var test = require('tape');
|
|
var gOPD = require('../');
|
|
|
|
test('gOPD', function (t) {
|
|
t.test('supported', { skip: !gOPD }, function (st) {
|
|
st.equal(typeof gOPD, 'function', 'is a function');
|
|
|
|
var obj = { x: 1 };
|
|
st.ok('x' in obj, 'property exists');
|
|
|
|
// @ts-expect-error TS can't figure out narrowing from `skip`
|
|
var desc = gOPD(obj, 'x');
|
|
st.deepEqual(
|
|
desc,
|
|
{
|
|
configurable: true,
|
|
enumerable: true,
|
|
value: 1,
|
|
writable: true
|
|
},
|
|
'descriptor is as expected'
|
|
);
|
|
|
|
st.end();
|
|
});
|
|
|
|
t.test('not supported', { skip: !!gOPD }, function (st) {
|
|
st.notOk(gOPD, 'is falsy');
|
|
|
|
st.end();
|
|
});
|
|
|
|
t.end();
|
|
});
|