Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
Signed-off-by: Cédric Foellmi <[email protected]>
  • Loading branch information
onekiloparsec committed Nov 17, 2023
1 parent 8838516 commit 9577be3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/planets/mars.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ describe('Mars', () => {
})

test('check apparent diameter', () => {
const UTCDate = new Date(Date.UTC(1992, 10, 9))
const jd = juliandays.getJulianDay(UTCDate)
const apparentDiameter = Mars.getEquatorialSemiDiameter(jd)
expect(apparentDiameter.toNumber()).toBeCloseTo(10.75 / 2) // arcsec
})
Expand Down
2 changes: 1 addition & 1 deletion tests/planets/saturn.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ describe('Saturn', () => {
test('check magnitude', () => {
const jd = juliandays.getJulianDay(new Date(Date.UTC(1992, 11, 20)))
// Old formula gives -3.8. No value provided in AA for new formulae.
expect(Saturn.getMagnitude(jd).toNumber()).toBeCloseTo(-4.21, 1)
expect(Saturn.getMagnitude(jd).toNumber()).toBeCloseTo(0.74, 1)
})

test('check ring system', () => {
Expand Down

0 comments on commit 9577be3

Please sign in to comment.