From 24e78d8a7cfe3605defde0e953cd18bf5f50b14f Mon Sep 17 00:00:00 2001 From: David Gamero Date: Wed, 6 Nov 2024 22:04:44 +0000 Subject: [PATCH] babel config --- babel.config.js | 6 ++++++ src/utilities/fileUtils.test.ts | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 babel.config.js diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 000000000..37b4b3277 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,6 @@ +module.exports = { + presets: [ + ['@babel/preset-env', {targets: {node: 'current'}}], + '@babel/preset-typescript' + ] +} diff --git a/src/utilities/fileUtils.test.ts b/src/utilities/fileUtils.test.ts index 322f19cee..bf9e75bef 100644 --- a/src/utilities/fileUtils.test.ts +++ b/src/utilities/fileUtils.test.ts @@ -3,7 +3,7 @@ import * as fileUtils from './fileUtils' import * as yaml from 'js-yaml' import fs from 'node:fs' import * as path from 'path' -import {K8sObject} from '../types/k8sObject' +import { K8sObject } from '../types/k8sObject' const sampleYamlUrl = 'https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/controllers/nginx-deployment.yaml' @@ -107,7 +107,7 @@ describe('File utils', () => { describe('moving files to temp', () => { it('correctly moves the contents of a file to the temporary directory', () => { - jest.spyOn(fs, 'writeFileSync').mockImplementation(() => {}) + jest.spyOn(fs, 'writeFileSync').mockImplementation(() => { }) jest.spyOn(fs, 'readFileSync').mockImplementation((filename) => { return 'test contents' })