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,
};
