Skip to content

Commit

Permalink
chore: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Dec 6, 2024
1 parent 7d01a65 commit 705aff6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { MatchersObject } from './types'

// selectively ported from https://github.com/jest-community/jest-extended
export const jestExtendedMatchers: MatchersObject = {
export const customMatchers: MatchersObject = {
toSatisfy(actual: unknown, expected: (actual: unknown) => boolean, message?: string) {
const { printReceived, printExpected, matcherHint } = this.utils
const pass = expected(actual)
Expand Down
2 changes: 1 addition & 1 deletion packages/expect/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export * from './constants'
export { customMatchers } from './custom-matchers'
export * from './jest-asymmetric-matchers'
export { JestChaiExpect } from './jest-expect'
export { JestExtend } from './jest-extend'
export { jestExtendedMatchers } from './jest-extended'
export { addCustomEqualityTesters } from './jest-matcher-utils'
export * from './jest-utils'
export { getState, setState } from './state'
Expand Down
4 changes: 2 additions & 2 deletions packages/vitest/src/integrations/chai/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import type { TaskPopulated, Test } from '@vitest/runner'
import {
addCustomEqualityTesters,
ASYMMETRIC_MATCHERS_OBJECT,
customMatchers,
getState,
GLOBAL_EXPECT,
jestExtendedMatchers,
setState,
} from '@vitest/expect'
import { getCurrentTest } from '@vitest/runner'
Expand Down Expand Up @@ -110,7 +110,7 @@ export function createExpect(test?: TaskPopulated) {
chai.util.addMethod(expect, 'assertions', assertions)
chai.util.addMethod(expect, 'hasAssertions', hasAssertions)

expect.extend(jestExtendedMatchers)
expect.extend(customMatchers)

return expect
}
Expand Down

0 comments on commit 705aff6

Please sign in to comment.