From 82752ab5cbfde00e56da948af2f42ff666fce5ff Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 23 Sep 2023 16:41:04 +0200 Subject: [PATCH] backend-test-utils: throw resolved path when trying to write outside dir in MockDirectory Signed-off-by: Patrik Oldsberg --- packages/backend-test-utils/src/filesystem/MockDirectory.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend-test-utils/src/filesystem/MockDirectory.ts b/packages/backend-test-utils/src/filesystem/MockDirectory.ts index 499c7f29fb..2f949987f5 100644 --- a/packages/backend-test-utils/src/filesystem/MockDirectory.ts +++ b/packages/backend-test-utils/src/filesystem/MockDirectory.ts @@ -238,7 +238,7 @@ export class MockDirectory { const fullPath = resolvePath(this.#root, entry.path); if (!isChildPath(this.#root, fullPath)) { throw new Error( - `Provided path must resolve to a child path of the mock directory, got '${entry.path}'`, + `Provided path must resolve to a child path of the mock directory, got '${fullPath}'`, ); }