test(drone-airspace): check the share token in CURRENT-STATE, not the changelog fragment

npm run changelog consumes changelog.d fragments at release, so a test that reads the fragment would fail with ENOENT afterwards. CURRENT-STATE is permanent.
This commit is contained in:
Sameh Khamis committed 2026-11-03 14:45:05 -08:00
1 parent 266825eddb
commit 329ef7e01c
1 file changed
+1 -3
+1 -3
View File
@@ -13,13 +13,11 @@ const section = currentState.slice(
);
const tokens = JSON.parse(read('src/data/layerStateTokenReservations.json'));
test('the changelog fragment names the reserved share-link token', () => {
test('CURRENT-STATE names the reserved share-link token', () => {
const token = JSON.stringify(tokens).match(
/\["drone-airspace","([^"]+)"\]/,
)?.[1];
assert.ok(token, 'drone-airspace has a reserved token');
const fragment = read('changelog.d/1086-prohibited-restricted-airspace.md');
assert.match(fragment, new RegExp(`share-link token \`${token}\``));
assert.match(section, new RegExp(`share-link token \`${token}\``));
});