mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
Release God's Eye View as open source
This commit is contained in:
1 parent
a5aaea7e16
commit
880a672b5e
433 files changed
+219893
-23
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import {
|
||||
accentForSeverity,
|
||||
FIRMS_AMBIENT_COHORT_LIMIT,
|
||||
FIRMS_OVERLAY_SOURCE_ID,
|
||||
satelliteShortName,
|
||||
} from './firmsLabels.js';
|
||||
|
||||
test('FIRMS formatting helpers retain the shipped severity palette', () => {
|
||||
assert.equal(accentForSeverity('red'), '224, 82, 82');
|
||||
assert.equal(accentForSeverity('orange'), '240, 178, 62');
|
||||
assert.equal(accentForSeverity('yellow'), '244, 227, 108');
|
||||
assert.equal(accentForSeverity('chartreuse'), accentForSeverity('yellow'));
|
||||
});
|
||||
|
||||
test('FIRMS satellite names retain the three VIIRS abbreviations', () => {
|
||||
assert.equal(satelliteShortName('N20'), 'N20');
|
||||
assert.equal(satelliteShortName('N21'), 'N21');
|
||||
assert.equal(satelliteShortName('N'), 'SNPP');
|
||||
assert.equal(satelliteShortName('TERRA-X9'), 'TERRA-');
|
||||
assert.equal(satelliteShortName(''), '');
|
||||
});
|
||||
|
||||
test('FIRMS host registration constants pin the shipped source budget', () => {
|
||||
assert.equal(FIRMS_OVERLAY_SOURCE_ID, 'firms');
|
||||
assert.equal(FIRMS_AMBIENT_COHORT_LIMIT, 18);
|
||||
});
|
||||
|
||||
test('FIRMS helper module cannot resurrect a dedicated canvas renderer', () => {
|
||||
const source = readFileSync(new URL('./firmsLabels.js', import.meta.url), 'utf8');
|
||||
assert.doesNotMatch(source, /createElement\(['"]canvas['"]\)/);
|
||||
assert.doesNotMatch(source, /postRender/);
|
||||
assert.doesNotMatch(source, /worldToWindowCoordinates/);
|
||||
});
|
||||
Reference in new issue
Block a user