Add import template into tui. Fix tests that fail on macos. Fix some updates.
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
existsSync,
|
||||
mkdirSync,
|
||||
readFileSync,
|
||||
realpathSync,
|
||||
rmSync,
|
||||
writeFileSync,
|
||||
} from "node:fs";
|
||||
@@ -110,7 +111,13 @@ describe("mnemonic utilities", () => {
|
||||
"/nonexistent",
|
||||
"mnemonic-relative",
|
||||
);
|
||||
expect(resolved).toBe(path.join(tempDir, "mnemonic-relative"));
|
||||
|
||||
// Due to some weird MacOS behavior we need to use realpathSync to get the correct path
|
||||
// Basically, tmpDir() returns a symlink, but moving to that path puts us at `/private/${tmpDir()}`
|
||||
const expectedPath = realpathSync(path.join(tempDir, "mnemonic-relative"));
|
||||
|
||||
// Compare to the expected path
|
||||
expect(resolved).toBe(expectedPath);
|
||||
} finally {
|
||||
process.chdir(originalCwd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user