Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Commit

Permalink
refactor: import schema inside the benchmarks file
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Dec 25, 2019
1 parent a9b7e6d commit 0fb59db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions benchmarks/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { validate, t } from '../validator'
import { validate, schema } from '../validator'
import { Suite } from 'benchmark'
const suite = new Suite()

suite
.add('Validate | cache', {
defer: true,
fn (deferred) {
validate({ username: 'virk' }, t.schema({ username: t.string() }), {}, {
validate({ username: 'virk' }, schema.new({ username: schema.string() }), {}, {
cacheKey: 'foo',
})
.then(() => {
Expand All @@ -17,7 +17,7 @@ suite
.add('Validate | no cache', {
defer: true,
fn (deferred) {
validate({ username: 'virk' }, t.schema({ username: t.string() }))
validate({ username: 'virk' }, schema.new({ username: schema.string() }))
.then(() => {
deferred.resolve()
})
Expand Down

0 comments on commit 0fb59db

Please sign in to comment.