diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index 44d896f..561f005 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -2,6 +2,7 @@ import { Bench } from "tinybench" import { withCodSpeed } from "@codspeed/tinybench-plugin" import * as fs from "fs" import { analyze } from '../src/index.js' +import { namedColors, systemColors, colorKeywords } from "../src/values/colors.js" let filelist = fs.readdirSync('./src/__fixtures__') let files = filelist @@ -259,6 +260,15 @@ bench.add('slice of nerdy.dev', () => { `) }) +bench.add('KeywordSet', () => { + namedColors.has('rebeccapurple') + namedColors.has('Highlight') + systemColors.has('Highlight') + systemColors.has('currentColor') + namedColors.has('not-a-color') + colorKeywords.has('currentColor') +}) + await bench.warmup() await bench.run()