test: make use of common/fixtures.fixturesDir
The common/fixtures module provides convenience methods for working with files in the test/fixtures directory. Make use of the `fixturesDir` value from module rather than value from common. - Replace `common.fixtures` with `fixtures.fixturesDir` PR-URL: https://github.com/nodejs/node/pull/15815 Reviewed-By: Ryan Graham <r.m.graham@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
a9a0146c8b
commit
c4231aaad3
@ -6,11 +6,12 @@ if (!common.hasCrypto)
|
|||||||
if (!common.enoughTestMem)
|
if (!common.enoughTestMem)
|
||||||
common.skip('memory-intensive test');
|
common.skip('memory-intensive test');
|
||||||
|
|
||||||
|
const fixtures = require('../common/fixtures');
|
||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
|
|
||||||
const BENCHMARK_FUNC_PATH =
|
const BENCHMARK_FUNC_PATH =
|
||||||
`${common.fixturesDir}/crypto-timing-safe-equal-benchmark-func`;
|
`${fixtures.fixturesDir}/crypto-timing-safe-equal-benchmark-func`;
|
||||||
function runOneBenchmark(...args) {
|
function runOneBenchmark(...args) {
|
||||||
const benchmarkFunc = require(BENCHMARK_FUNC_PATH);
|
const benchmarkFunc = require(BENCHMARK_FUNC_PATH);
|
||||||
const result = benchmarkFunc(...args);
|
const result = benchmarkFunc(...args);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user