mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
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:
1 parent
266825eddb
commit
329ef7e01c
1 file changed
+1
-3
@@ -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}\``));
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user