Skip to content

Commit 883f019

Browse files
committed
cleanup unused vars in tests
1 parent 9d7aeb4 commit 883f019

File tree

6 files changed

+6
-12
lines changed

6 files changed

+6
-12
lines changed

__tests__/functions/check-input.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {checkInput} from '../../src/functions/check-input.js'
2-
import {vi, expect, test, beforeEach} from 'vitest'
2+
import {expect, test} from 'vitest'
33

44
test('checks an input an finds that it is valid', async () => {
55
expect(checkInput('production')).toStrictEqual('production')

__tests__/functions/is-timestamp-older.test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import * as core from '@actions/core'
22
import {vi, expect, describe, test, beforeEach} from 'vitest'
33
import {isTimestampOlder} from '../../src/functions/is-timestamp-older.js'
44

5-
const debugMock = vi.spyOn(core, 'debug')
6-
const errorMock = vi.spyOn(core, 'error')
7-
85
beforeEach(() => {
96
vi.clearAllMocks()
107
})

__tests__/functions/react-emote.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {reactEmote} from '../../src/functions/react-emote.js'
2-
import {vi, expect, test, beforeEach} from 'vitest'
2+
import {vi, expect, test} from 'vitest'
33

44
const context = {
55
repo: {

__tests__/functions/time-diff.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {timeDiff} from '../../src/functions/time-diff.js'
2-
import {vi, expect, test, beforeEach} from 'vitest'
2+
import {expect, test} from 'vitest'
33

44
test('checks the time elapsed between two dates - days apart', async () => {
55
expect(

__tests__/functions/timestamp.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import {timestamp} from '../../src/functions/timestamp.js'
2-
import {vi, expect, describe, test, beforeEach} from 'vitest'
2+
import {vi, expect, beforeEach} from 'vitest'
33

44
beforeEach(() => {
55
vi.clearAllMocks()
66
})
77

8-
describe('timestamp', () => {
9-
it('should return the current date in ISO 8601 format', () => {
8+
test('timestamp', () => {
9+
expect('should return the current date in ISO 8601 format', () => {
1010
const mockDate = new Date('2025-01-01T00:00:00.000Z')
1111
vi.spyOn(global, 'Date').mockImplementation(() => mockDate)
1212

__tests__/functions/valid-deployment-order.test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ import {COLORS} from '../../src/functions/colors.js'
44
import {validDeploymentOrder} from '../../src/functions/valid-deployment-order.js'
55
import * as activeDeployment from '../../src/functions/deployment.js'
66

7-
const infoMock = vi.spyOn(core, 'info')
8-
const warningMock = vi.spyOn(core, 'warning')
9-
const errorMock = vi.spyOn(core, 'error')
107
const setOutputMock = vi.spyOn(core, 'setOutput')
118
const activeDeploymentMock = vi.spyOn(activeDeployment, 'activeDeployment')
129

0 commit comments

Comments
 (0)