Icu 14778 add more sessions tests (#2615)

* test: 💍 Add desktop sessions tests

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-14778

* chore: 🤖 Add support for dotenv and stop using relative paths

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-14778

* refactor: 💡 Force usage of node 20

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-14778
This commit is contained in:
Zhihe Li authored and GitHub committed 2024-12-10 16:11:12 -05:00
1 parent 078e36f9b8
commit e16b4e68c8
7 files changed
+301 -28

No files matched your search

+7 -1
View File
@@ -13,7 +13,13 @@ import fs from 'fs';
* @return {string}
*/
const getExecutablePath = (buildDirectory = 'out') => {
const rootDir = path.resolve('../ui/desktop/electron-app');
// Using process.cwd() can change depending on where you run the tests so we use the current file location
// __dirname isn't available in ES modules so we need to indirectly get the directory
const rootDir = path.resolve(
import.meta.dirname,
'../../../ui/desktop/electron-app',
);
// directory where the builds are stored
const outDir = path.resolve(rootDir, buildDirectory);
// list of files in the out directory