mirror of
https://github.com/acamarata/moon-sighting.git
synced 2026-06-30 19:04:24 +00:00
test(spk): cover kernel-backed London sighting report
This commit is contained in:
parent
65d2def00a
commit
ed221cfd40
1 changed files with 15 additions and 0 deletions
15
test.mjs
15
test.mjs
|
|
@ -415,3 +415,18 @@ describe('Input validation', () => {
|
|||
assert.throws(() => getMoon(new Date(), 0, 200), /longitude/)
|
||||
})
|
||||
})
|
||||
|
||||
describe('kernel-backed sighting pipeline', () => {
|
||||
it('computes London sunset and moonset for 2025-03-29', async () => {
|
||||
await initKernels()
|
||||
|
||||
const observer = { lat: 51.5, lon: -0.1, elevation: 0 }
|
||||
const report = await getMoonSightingReport(new Date('2025-03-29T00:00:00Z'), observer)
|
||||
|
||||
assert.ok(report.sunsetUTC instanceof Date, `report.sunsetUTC=${report.sunsetUTC}`)
|
||||
assert.ok(report.moonsetUTC instanceof Date, `report.moonsetUTC=${report.moonsetUTC}`)
|
||||
assert.ok(report.bestTimeUTC instanceof Date, `report.bestTimeUTC=${report.bestTimeUTC}`)
|
||||
assert.equal(report.yallop?.category, 'F')
|
||||
assert.equal(report.odeh?.zone, 'D')
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue