mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 11:24:00 +00:00
test: keep provider fixtures independent of calendar time
This commit is contained in:
1 parent
f9a85528fe
commit
2e3cb6270a
1 file changed
+3
-3
@@ -129,7 +129,7 @@ test('OpenSky state and track routes share tokens, retain cache and use regional
|
|||||||
const fresh = await import(
|
const fresh = await import(
|
||||||
`../../server/providers/aircraft/opensky.js?fallback=${now}`
|
`../../server/providers/aircraft/opensky.js?fallback=${now}`
|
||||||
);
|
);
|
||||||
environment(t, { OPENSKY_AUTH_MODE: 'anon' });
|
process.env.OPENSKY_AUTH_MODE = 'anon';
|
||||||
const fallback = await install(fresh.openSkyProxy())(
|
const fallback = await install(fresh.openSkyProxy())(
|
||||||
'/api/opensky',
|
'/api/opensky',
|
||||||
'?lat=30&lon=-97',
|
'?lat=30&lon=-97',
|
||||||
@@ -177,8 +177,8 @@ test('AIS preview route ingests through the socket, returns tracks and disposes
|
|||||||
socket.on('message', (raw) => {
|
socket.on('message', (raw) => {
|
||||||
assert.equal(JSON.parse(raw).APIKey, 'fixture-key');
|
assert.equal(JSON.parse(raw).APIKey, 'fixture-key');
|
||||||
for (const [lat, epoch] of [
|
for (const [lat, epoch] of [
|
||||||
[30, 1_800_000_000],
|
[30, Math.floor(Date.now() / 1000) - 120],
|
||||||
[30.01, 1_800_000_060],
|
[30.01, Math.floor(Date.now() / 1000) - 60],
|
||||||
]) {
|
]) {
|
||||||
socket.send(
|
socket.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
|||||||
Reference in new issue
Block a user