Skip to content

Commit

Permalink
chore: correct typo (#1199)
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowingFox committed Apr 27, 2022
1 parent 750c80b commit 0e95cc8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/vitest/src/index.ts
Expand Up @@ -124,7 +124,7 @@ declare global {
}

// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
// @ts-ignore build namspace conflict
// @ts-ignore build namespace conflict
type VitestAssertion<A, T> = {
[K in keyof A]: A[K] extends Chai.Assertion
? Assertion<T>
Expand Down
6 changes: 3 additions & 3 deletions packages/vitest/src/integrations/chai/jest-expect.ts
Expand Up @@ -489,13 +489,13 @@ export const JestChaiExpect: ChaiPlugin = (chai, utils) => {
def(['toHaveReturnedTimes', 'toReturnTimes'], function (times: number) {
const spy = getSpy(this)
const spyName = spy.getMockName()
const successfullReturns = spy.mock.results.reduce((success, { type }) => type === 'throw' ? success : ++success, 0)
const successfulReturns = spy.mock.results.reduce((success, { type }) => type === 'throw' ? success : ++success, 0)
this.assert(
successfullReturns === times,
successfulReturns === times,
`expected "${spyName}" to be successfully called ${times} times`,
`expected "${spyName}" to not be successfully called ${times} times`,
`expected number of returns: ${times}`,
`received number of returns: ${successfullReturns}`,
`received number of returns: ${successfulReturns}`,
)
})
def(['toHaveReturnedWith', 'toReturnWith'], function (value: any) {
Expand Down
2 changes: 1 addition & 1 deletion packages/vitest/src/integrations/coverage.ts
Expand Up @@ -82,7 +82,7 @@ export async function reportCoverage(ctx: Vitest) {

// This is a magic number. It corresponds to the amount of code
// that we add in packages/vite-node/src/client.ts:114 (vm.runInThisContext)
// TODO: Include our transformations in soucemaps
// TODO: Include our transformations in sourcemaps
const offset = 203

report._getSourceMap = (coverage: Profiler.ScriptCoverage) => {
Expand Down
2 changes: 1 addition & 1 deletion test/core/test/date-mock.test.ts
Expand Up @@ -5,7 +5,7 @@ describe('testing date mock functionality', () => {
vi.useRealTimers()
})

test('seting time in the past', () => {
test('setting time in the past', () => {
const date = new Date(2000, 1, 1)

vi.setSystemTime(date)
Expand Down

0 comments on commit 0e95cc8

Please sign in to comment.