From 9f6aa9f69726ea5b8c34883527a03824f7f48311 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Fri, 15 Oct 2021 02:39:09 +0100 Subject: [PATCH] chore(NA): apply fs.realpathSync into the calculated REPO_ROOT paths on babel_register_for_test_plugins --- .../lib/babel_register_for_test_plugins.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/kbn-test/src/functional_tests/lib/babel_register_for_test_plugins.js b/packages/kbn-test/src/functional_tests/lib/babel_register_for_test_plugins.js index 554e923602a600..7305b56a222b90 100644 --- a/packages/kbn-test/src/functional_tests/lib/babel_register_for_test_plugins.js +++ b/packages/kbn-test/src/functional_tests/lib/babel_register_for_test_plugins.js @@ -6,16 +6,17 @@ * Side Public License, v 1. */ +const Fs = require('path'); const Path = require('path'); const { REPO_ROOT } = require('@kbn/dev-utils'); -const KIBANA_ROOT = Path.resolve(__dirname, '../../../../../'); +// const KIBANA_ROOT = Path.resolve(__dirname, '../../../../../'); -console.log(Path.resolve(REPO_ROOT, 'test')); -console.log(require('fs').realpathSync(Path.resolve(REPO_ROOT, 'test'))); -console.log(Path.resolve(KIBANA_ROOT, 'test')); -throw new Error('FAIL CI'); +// console.log(Path.resolve(REPO_ROOT, 'test')); +// console.log(require('fs').realpathSync(Path.resolve(REPO_ROOT, 'test'))); +// console.log(Path.resolve(KIBANA_ROOT, 'test')); +// throw new Error('FAIL CI'); // modifies all future calls to require() to automatically // compile the required source with babel @@ -29,7 +30,7 @@ require('@babel/register')({ // TODO: should should probably remove this link back to the source Path.resolve(REPO_ROOT, 'x-pack/plugins/task_manager/server/config.ts'), Path.resolve(REPO_ROOT, 'src/core/utils/default_app_categories.ts'), - ], + ].map((path) => Fs.realpathSync(path)), babelrc: false, presets: [require.resolve('@kbn/babel-preset/node_preset')], extensions: ['.js', '.ts', '.tsx'],