From 728d2a65dcb05c26c0995cdb17b12d9ec0e008c9 Mon Sep 17 00:00:00 2001 From: Bryan Mishkin <698306+bmish@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:26:12 -0500 Subject: [PATCH] revert jest setup file --- jest.config.ts | 2 +- test/{jest.setup.ts => jest.setup.cjs} | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) rename test/{jest.setup.ts => jest.setup.cjs} (51%) diff --git a/jest.config.ts b/jest.config.ts index 889f7dfc..0f491169 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -8,7 +8,7 @@ const defaultEsmPreset = createDefaultEsmPreset(); const config: Config = { testEnvironment: 'node', testMatch: ['/test/**/*-test.ts'], - setupFiles: ['/test/jest.setup.ts'], + setupFiles: ['/test/jest.setup.cjs'], ...defaultEsmPreset, moduleNameMapper: { '^(\\.{1,2}/.*)\\.js$': '$1', diff --git a/test/jest.setup.ts b/test/jest.setup.cjs similarity index 51% rename from test/jest.setup.ts rename to test/jest.setup.cjs index 99141b16..82c48591 100644 --- a/test/jest.setup.ts +++ b/test/jest.setup.cjs @@ -1,6 +1,6 @@ -import os from 'node:os'; -import sinon from 'sinon'; +const os = require('node:os'); +const sinon = require('sinon'); -export default function () { +module.exports = function () { sinon.stub(os, 'EOL').value('\n'); // Stub os.EOL to always be '\n' for testing/snapshot purposes. -} +};