Skip to content

Commit

Permalink
Address PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanchalai Tanglertsampan committed Feb 12, 2016
1 parent 5a76a1d commit 8ca031e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/harness/loggedIO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,18 @@ namespace Playback {
recordLog.directoriesRead.push(logEntry);
return result;
},
(path, extension, exclude) => findResultByPath(wrapper, replayLog.directoriesRead.filter(d => d.extension === extension && ts.arrayIsEqualTo(d.exclude, exclude)), path));
(path, extension, exclude) => findResultByPath(wrapper,
replayLog.directoriesRead.filter(
d => {
if (d.extension === extension) {
if (d.exclude) {
return ts.arrayIsEqualTo(d.exclude, exclude);
}
return true;
}
return false;
}
), path));

wrapper.writeFile = recordReplay(wrapper.writeFile, underlying)(
(path, contents) => callAndRecord(underlying.writeFile(path, contents), recordLog.filesWritten, { path, contents, bom: false }),
Expand Down

0 comments on commit 8ca031e

Please sign in to comment.