The existsSync mock built expected paths with path.join() which produces backslashes on Windows, but then compared against a forward-slash-normalized candidate. Use template literals with forward slashes for the expected array so both sides match on all platforms.