Skip to content

Commit

Permalink
test: corrects tests about server utils functions
Browse files Browse the repository at this point in the history
  • Loading branch information
eriandev committed May 10, 2023
1 parent 19c3e46 commit 4c2c3d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/client/utils.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expect, it, vi } from 'vitest'
import { MONTHS_LIST } from '$lib/client/consts'
import weatherCodes from '$lib/client/data/weather_codes.json'
import { getConditionByCode, getFormattedDateByUnixTime } from '$lib/client/utils'
import { getConditionByCode, getFormattedDateByUnixTime } from '$lib/server/utils'

const date = new Date(1654137000 * 1000)
const monthNumber = date.getMonth()
Expand Down
4 changes: 3 additions & 1 deletion tests/server/utils.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it, vi } from 'vitest'
import { isResponseOk, response } from '$lib/server/utils'

vi.mock('$env/dynamic/public', () => ({ env: import.meta.env }))

describe('response function', () => {
it('should return the same status', () => {
const status = 418
Expand Down

1 comment on commit 4c2c3d0

@vercel
Copy link

@vercel vercel bot commented on 4c2c3d0 May 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

weather-app – ./

weather-app-git-main-eriandev.vercel.app
weather-app-eriandev.vercel.app
eriandev-weather-app.vercel.app

Please sign in to comment.