Skip to content

Commit 346d286

Browse files
committed
fix(test): add afterEach import and remove unused variables
1 parent 1dac550 commit 346d286

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

test/env/node-auth-token.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ describe('env/node-auth-token', () => {
8282
expect(getNodeAuthToken()).toBe('test-token')
8383

8484
clearEnv('NODE_AUTH_TOKEN')
85-
const _result = clearEnv('NODE_AUTH_TOKEN')
8685
expect(typeof getNodeAuthToken()).toMatch(/string|undefined/)
8786

8887
setEnv('NODE_AUTH_TOKEN', 'new-token')

test/maintained-node-versions.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ describe('maintained-node-versions', () => {
7575
.map(v => v.split('.').map(Number))
7676
.sort((a, b) => {
7777
for (let i = 0; i < 3; i++) {
78-
if (a[i] !== b[i]) {return a[i] - b[i]}
78+
if (a[i] !== b[i]) {
79+
return a[i] - b[i]
80+
}
7981
}
8082
return 0
8183
})
@@ -106,28 +108,24 @@ describe('maintained-node-versions', () => {
106108
describe('immutability', () => {
107109
it('should not allow modification of array elements', () => {
108110
expect(() => {
109-
// @ts-expect-error - testing immutability
110111
maintainedNodeVersions[0] = '99.99.99'
111112
}).toThrow()
112113
})
113114

114115
it('should not allow push', () => {
115116
expect(() => {
116-
// @ts-expect-error - testing immutability
117117
maintainedNodeVersions.push('99.99.99')
118118
}).toThrow()
119119
})
120120

121121
it('should not allow pop', () => {
122122
expect(() => {
123-
// @ts-expect-error - testing immutability
124123
maintainedNodeVersions.pop()
125124
}).toThrow()
126125
})
127126

128127
it('should not allow modification of named properties', () => {
129128
expect(() => {
130-
// @ts-expect-error - testing immutability
131129
maintainedNodeVersions.current = '99.99.99'
132130
}).toThrow()
133131
})

test/regexps.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ describe('regexps', () => {
5858
})
5959

6060
it('should escape multiple special characters', () => {
61+
// biome-ignore lint/suspicious/noTemplateCurlyInString: Testing regex escape for curly braces
6162
expect(escapeRegExp('.*+?^${}()|[]')).toBe(
6263
'\\.\\*\\+\\?\\^\\$\\{\\}\\(\\)\\|\\[\\]',
6364
)

test/stdio/footer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @fileoverview Unit tests for console footer formatting utilities.
33
*/
44

5-
import { beforeEach, describe, expect, it, vi } from 'vitest'
5+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
66

77
import {
88
createFooter,

test/suppress-warnings.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ describe('suppress-warnings', () => {
249249
})
250250

251251
it('should restore warnings after callback', async () => {
252-
const _original = process.emitWarning
253252
const warningSpy = vi.fn()
254253

255254
await withSuppressedWarnings('ExperimentalWarning', () => {

0 commit comments

Comments
 (0)