Files

28 lines
1.0 KiB
JavaScript
Raw Permalink Normal View History

2026-10-29 11:57:29 +01:00
// Generated, do not edit. sha256:dc9b5240735aade2cd4727a1bd632ab45a0fa5cea12b50a575de8c45524b23a8
import { describe, it } from 'node:test';
import assert from 'node:assert/strict';
import { mkdtempSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { licenseState } from '../../server/license.mjs';
const LEEG = mkdtempSync(join(tmpdir(), 'lic-editie-'));
describe('de stand zonder de volledige editie', () => {
it('is op 0.x de gratis stand, want develop bestaat hier niet', () => {
const s = licenseState('0.2.0', LEEG);
assert.equal(s.level, 'free');
assert.equal(s.enforced, true);
});
it('laat ASSETAPP_LICENSE_STATE=full ook op 0.x niets openzetten', () => {
const vorige = process.env.ASSETAPP_LICENSE_STATE;
try {
process.env.ASSETAPP_LICENSE_STATE = 'full';
assert.equal(licenseState('0.2.0', LEEG).level, 'free');
} finally {
if (vorige === undefined) delete process.env.ASSETAPP_LICENSE_STATE;
else process.env.ASSETAPP_LICENSE_STATE = vorige;
}
});
});