Skip to content

Commit 64689d2

Browse files
committed
always save outputs
1 parent cdc6ea6 commit 64689d2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/comparison-tests/create-and-execute-test.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,10 @@ function storeStats(stats, testState, paths) {
268268

269269
function compareFiles(paths, test, patch) {
270270
if (saveOutputMode) {
271-
const actualFiles = glob.sync('**/*', { cwd: paths.actualOutput, nodir: true, dot: true }),
272-
expectedFiles = glob.sync('**/*', { cwd: paths.originalExpectedOutput, nodir: true, dot: true })
273-
.filter(function (file) { return !/^patch/.test(file); }),
274-
allFiles = {};
271+
const actualFiles = glob.sync('**/*', { cwd: paths.actualOutput, nodir: true, dot: true });
272+
const expectedFiles = glob.sync('**/*', { cwd: paths.originalExpectedOutput, nodir: true, dot: true })
273+
.filter(function (file) { return !/^patch/.test(file); });
274+
const allFiles = {};
275275

276276
actualFiles.forEach(function (file) { allFiles[file] = true });
277277
expectedFiles.forEach(function (file) {
@@ -282,9 +282,11 @@ function compareFiles(paths, test, patch) {
282282
Object.keys(allFiles).forEach(function (file) {
283283
const actual = getNormalisedFileContent(file, paths.actualOutput);
284284
const expected = getNormalisedFileContent(file, paths.expectedOutput);
285-
if (actual !== expected) {
285+
286+
// I believe we always want to copy this
287+
// if (actual !== expected) {
286288
fs.copySync(path.join(paths.actualOutput, file), path.join(paths.originalExpectedOutput, file));
287-
}
289+
// }
288290
});
289291
}
290292
else {

0 commit comments

Comments
 (0)