Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Jan 12, 2024
1 parent fca9ac2 commit 7018ef5
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions test/core/test/expect.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Tester, equals } from '@vitest/expect'
import type { Tester } from '@vitest/expect'
import { getCurrentTest } from '@vitest/runner'
import { describe, expect, expectTypeOf, test, vi } from 'vitest'

Expand Down Expand Up @@ -173,12 +173,12 @@ describe('recursive custom equality tester', () => {
}
}

const arePersonsEqual = (a: unknown, b: unknown, customTesters: Array<Tester>) => {
const arePersonsEqual: Tester = function (a, b, customTesters) {
const isAPerson = a instanceof Person
const isBPerson = b instanceof Person

if (isAPerson && isBPerson)
return a.name === b.name && equals(a.address, b.address, customTesters)
return a.name === b.name && this.equals(a.address, b.address, customTesters)

else if (isAPerson === isBPerson)
return undefined
Expand All @@ -187,10 +187,7 @@ describe('recursive custom equality tester', () => {
return false
}

const areAddressesEqual = (
a: unknown,
b: unknown,
) => {
const areAddressesEqual: Tester = (a, b) => {
const isAAddress = a instanceof Address
const isBAddress = b instanceof Address

Expand Down

0 comments on commit 7018ef5

Please sign in to comment.