agent updates
This commit is contained in:
24
test/helpers.js
Normal file
24
test/helpers.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const path = require('node:path');
|
||||
|
||||
function makeLogger() {
|
||||
return {
|
||||
debug() {},
|
||||
info() {},
|
||||
warn() {},
|
||||
error() {},
|
||||
};
|
||||
}
|
||||
|
||||
function near(actual, expected, epsilon = 1e-6) {
|
||||
return Math.abs(actual - expected) <= epsilon;
|
||||
}
|
||||
|
||||
function fixturePath(...segments) {
|
||||
return path.join(__dirname, ...segments);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
makeLogger,
|
||||
near,
|
||||
fixturePath,
|
||||
};
|
||||
Reference in New Issue
Block a user