Skip to content

Commit

Permalink
Update Readme & Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WoCha-FR committed Nov 20, 2022
1 parent 064929f commit 503f116
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ frenchtools/Lyon69/vacances
{
"jourestvacance":0,
"journomvacance":"",
"jourfinvacance":-1,
"jourfinvacance":"",
"prochainvacdate":"17/12",
"prochainvacnom":"Vacances de Noël",
"prochainvacdif":30
Expand All @@ -140,7 +140,7 @@ frenchtools/Lyon69/soleil
"soleilposv":"-0.70",
"soleilposh":"209.80",
"jourduree":"9:28",
"jourdifference":"- 3m26s"
"jourdifference":"-3m26s"
}
```

Expand Down
4 changes: 2 additions & 2 deletions tests/infoville.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ describe('Sun and Moon', () => {
expect(spy).toHaveBeenCalledWith('frame', 'topic/soleil', res)
})
test('Should return correct sun value for datetime', async () => {
const res = { jourdifference: '+2m55s', jourduree: '13:09', soleilcoucher: '20:08', soleilelevation: '-34.41', soleilelevzenith: '53.99', soleillever: '6:58', soleilposh: '5.00', soleilposv: '-15.00', soleilzenith: '13:33' }
const res = { jourdifference: '+2m55s', jourduree: '13:09', soleilcoucher: '20:08', soleilelevation: '53.52', soleilelevzenith: '53.99', soleillever: '6:58', soleilposh: '125.19', soleilposv: '39.52', soleilzenith: '13:33' }
const spy = jest.spyOn(eventEmitter, 'emit').mockImplementation(() => {})
jest.useFakeTimers({ now: new Date(2023, 3, 10, 14, 0) })
await client.getSunData('43.8146', '7.1621', 'topic')
expect(spy).toHaveBeenCalledWith('frame', 'topic/soleil', res)
})
test('Should return correct sun value for datetime', async () => {
const res = { jourdifference: '+0m05s', jourduree: '15:27', soleilcoucher: '21:18', soleilelevation: '32.54', soleilelevzenith: '69.62', soleillever: '5:50', soleilposh: '191.99', soleilposv: '10,71', soleilzenith: '13:34' }
const res = { jourdifference: '+0m5s', jourduree: '15:27', soleilcoucher: '21:18', soleilelevation: '32.54', soleilelevzenith: '69.62', soleillever: '5:50', soleilposh: '181.99', soleilposv: '10.71', soleilzenith: '13:34' }
const spy = jest.spyOn(eventEmitter, 'emit').mockImplementation(() => {})
jest.useFakeTimers({ now: new Date(2023, 5, 21, 18, 0) })
await client.getSunData('43.8146', '7.1621', 'topic')
Expand Down

0 comments on commit 503f116

Please sign in to comment.