Skip to content

Commit

Permalink
refactor: move expr
Browse files Browse the repository at this point in the history
  • Loading branch information
zxch3n committed Mar 13, 2022
1 parent f848bb1 commit 7a45ae5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/vitest/src/runtime/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ export async function runTest(test: Test) {
return
}

const startDate = Date.now()
const start = performance.now()

test.result = {
state: 'run',
startTime: Date.now(),
}
updateTask(test)

Expand Down Expand Up @@ -128,7 +128,6 @@ export async function runTest(test: Test) {

getSnapshotClient().clearTest()

test.result.startTime = startDate
test.result.duration = performance.now() - start

__vitest_worker__.current = undefined
Expand All @@ -152,11 +151,11 @@ export async function runSuite(suite: Suite) {
return
}

const startDate = Date.now()
const start = performance.now()

suite.result = {
state: 'run',
startTime: Date.now(),
}

updateTask(suite)
Expand Down Expand Up @@ -188,7 +187,6 @@ export async function runSuite(suite: Suite) {
}
}
suite.result.duration = performance.now() - start
suite.result.startTime = startDate

if (suite.mode === 'run') {
if (!hasTests(suite)) {
Expand Down

0 comments on commit 7a45ae5

Please sign in to comment.