fix(cli): environment resolution in the single-entry export format (#3687)

This commit is contained in:
James George
2023-12-22 19:21:33 +05:30
committed by GitHub
parent ddf7eb6ad6
commit 0df194f9c5
6 changed files with 79 additions and 6 deletions

View File

@@ -22,12 +22,10 @@ export const trimAnsi = (target: string) => {
export const getErrorCode = (out: string) => {
const ansiTrimmedStr = trimAnsi(out);
return ansiTrimmedStr.split(" ")[0];
};
export const getTestJsonFilePath = (file: string) => {
const filePath = `${process.cwd()}/src/__tests__/samples/${file}`;
const filePath = resolve(__dirname, `../../src/__tests__/samples/${file}`);
return filePath;
};