backend-test-utils: throw resolved path when trying to write outside dir in MockDirectory

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-09-23 16:41:04 +02:00
parent 7c6141f54d
commit 82752ab5cb
@@ -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}'`,
);
}