From 835d9a050943e60a7850c9806eee0b8b76720b70 Mon Sep 17 00:00:00 2001 From: Alec Larson <1925840+aleclarson@users.noreply.github.com> Date: Wed, 3 Jul 2024 20:02:15 -0400 Subject: [PATCH] chore: add benchmarks --- benchmarks/typed/isMap.bench.ts | 5 ++--- benchmarks/typed/isRegExp.bench.ts | 5 ++--- benchmarks/typed/isSet.bench.ts | 5 ++--- benchmarks/typed/isWeakMap.bench.ts | 5 ++--- benchmarks/typed/isWeakSet.bench.ts | 5 ++--- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/benchmarks/typed/isMap.bench.ts b/benchmarks/typed/isMap.bench.ts index 8e38661df..ebbe8ea06 100644 --- a/benchmarks/typed/isMap.bench.ts +++ b/benchmarks/typed/isMap.bench.ts @@ -2,8 +2,7 @@ import * as _ from 'radashi' import { bench } from 'vitest' describe('isMap', () => { - bench('with no arguments', () => { - _.isMap() + bench('with valid input', () => { + _.isMap(new Map()) }) }) - diff --git a/benchmarks/typed/isRegExp.bench.ts b/benchmarks/typed/isRegExp.bench.ts index 7c590dc0f..96b76b5c5 100644 --- a/benchmarks/typed/isRegExp.bench.ts +++ b/benchmarks/typed/isRegExp.bench.ts @@ -2,8 +2,7 @@ import * as _ from 'radashi' import { bench } from 'vitest' describe('isRegExp', () => { - bench('with no arguments', () => { - _.isRegExp() + bench('with valid input', () => { + _.isRegExp(/.+/) }) }) - diff --git a/benchmarks/typed/isSet.bench.ts b/benchmarks/typed/isSet.bench.ts index 7813f3e6b..c1148ea3e 100644 --- a/benchmarks/typed/isSet.bench.ts +++ b/benchmarks/typed/isSet.bench.ts @@ -2,8 +2,7 @@ import * as _ from 'radashi' import { bench } from 'vitest' describe('isSet', () => { - bench('with no arguments', () => { - _.isSet() + bench('with valid input', () => { + _.isSet(new Set()) }) }) - diff --git a/benchmarks/typed/isWeakMap.bench.ts b/benchmarks/typed/isWeakMap.bench.ts index 9056fd5c5..147423f45 100644 --- a/benchmarks/typed/isWeakMap.bench.ts +++ b/benchmarks/typed/isWeakMap.bench.ts @@ -2,8 +2,7 @@ import * as _ from 'radashi' import { bench } from 'vitest' describe('isWeakMap', () => { - bench('with no arguments', () => { - _.isWeakMap() + bench('with valid input', () => { + _.isWeakMap(new WeakMap()) }) }) - diff --git a/benchmarks/typed/isWeakSet.bench.ts b/benchmarks/typed/isWeakSet.bench.ts index 7a32c8d5a..1b01819f0 100644 --- a/benchmarks/typed/isWeakSet.bench.ts +++ b/benchmarks/typed/isWeakSet.bench.ts @@ -2,8 +2,7 @@ import * as _ from 'radashi' import { bench } from 'vitest' describe('isWeakSet', () => { - bench('with no arguments', () => { - _.isWeakSet() + bench('with valid input', () => { + _.isWeakSet(new WeakSet()) }) }) -