Skip to content

Commit

Permalink
Update suite.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
fb55 committed Nov 22, 2022
1 parent 8335731 commit 99b9e0b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions benchmark/suite.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import fs from 'fs';
import path from 'path';
import fs from 'node:fs';
import path from 'node:path';
import { Script } from 'node:vm';

import { Suite, Event } from 'benchmark';
import { JSDOM } from 'jsdom';
import { Script } from 'vm';
import cheerio from '../lib/index.js';

const documentDir = path.join(__dirname, 'documents');
Expand Down Expand Up @@ -73,11 +73,9 @@ export default class Suites {

jQueryScript.runInContext(dom.getInternalVMContext());

const setupData: T = options.setup(dom.window.$);
const setupData: T = options.setup(dom.window['$']);

suite.add('jsdom', () => {
testFn(dom.window.$, setupData);
});
suite.add('jsdom', () => testFn(dom.window['$'], setupData));
suite.run();
}

Expand Down

0 comments on commit 99b9e0b

Please sign in to comment.