Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
Signed-off-by: Gnanakeethan Balasubramaniam <[email protected]>
  • Loading branch information
gnanakeethan authored and jawache committed Oct 1, 2023
1 parent 6bac540 commit 2eea245
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions src/lib/watt-time/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,14 @@ describe('watt-time:configure test', () => {
await expect(
model.calculate([
{
latitude: 37.7749,
longitude: -122.4194,
location: '37.7749,-122.4194',
timestamp: '2021-01-01T00:00:00Z',
duration: 1200,
},
])
).resolves.toStrictEqual([
{
latitude: 37.7749,
longitude: -122.4194,
location: '37.7749,-122.4194',
timestamp: '2021-01-01T00:00:00Z',
duration: 1200,
'grid-ci': 2185.332173907599,
Expand All @@ -54,16 +52,14 @@ describe('watt-time:configure test', () => {
await expect(
model.calculate([
{
latitude: 37.7749,
longitude: -122.4194,
location: '37.7749,-122.4194',
timestamp: '2021-01-01T00:00:00Z',
duration: 120,
},
])
).resolves.toStrictEqual([
{
latitude: 37.7749,
longitude: -122.4194,
location: '37.7749,-122.4194',
timestamp: '2021-01-01T00:00:00Z',
duration: 120,
'grid-ci': 2198.0087539832293,
Expand All @@ -72,16 +68,14 @@ describe('watt-time:configure test', () => {
await expect(
model.calculate([
{
latitude: 37.7749,
longitude: -122.4194,
location: '37.7749,-122.4194',
timestamp: '2021-01-01T00:00:00Z',
duration: 300,
},
])
).resolves.toStrictEqual([
{
latitude: 37.7749,
longitude: -122.4194,
location: '37.7749,-122.4194',
timestamp: '2021-01-01T00:00:00Z',
duration: 300,
'grid-ci': 2198.0087539832293,
Expand All @@ -90,16 +84,14 @@ describe('watt-time:configure test', () => {
await expect(
model.calculate([
{
latitude: 37.7749,
longitude: -122.4194,
location: '37.7749,-122.4194',
timestamp: '2021-01-01T00:00:00Z',
duration: 360,
},
])
).resolves.toStrictEqual([
{
latitude: 37.7749,
longitude: -122.4194,
location: '37.7749,-122.4194',
timestamp: '2021-01-01T00:00:00Z',
duration: 360,
'grid-ci': 2193.5995087395318,
Expand All @@ -109,14 +101,12 @@ describe('watt-time:configure test', () => {
await expect(
model.calculate([
{
latitude: 37.7749,
longitude: -122.4194,
location: '37.7749,-122.4194',
timestamp: '2021-01-01T00:00:00Z',
duration: 3600,
},
{
latitude: 37.7749,
longitude: -122.4194,
location: '37.7749,-122.4194',
timestamp: '2021-01-02T01:00:00Z',
duration: 3600,
},
Expand Down

0 comments on commit 2eea245

Please sign in to comment.