Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bearfriend committed Oct 28, 2024
1 parent 330fc26 commit 7104f8e
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/server/visual-diff-reporter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as os from 'node:os';
import { cpSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
import { dirname, join } from 'node:path';
import * as os from 'node:os';
import { env } from 'node:process';
import { execSync } from 'node:child_process';
import { fileURLToPath } from 'node:url';
Expand Down Expand Up @@ -63,26 +63,20 @@ function createData(rootDir, updateGoldens, sessions) {
const system = {
platform: os.platform(),
release: os.release(),
arch: os.arch(),
previous: metadata.system && {
platform: metadata.system.platform,
release: metadata.system.release,
arch: metadata.system.arch
}
arch: os.arch()
};

if (isCI || updateGoldens) {
metadata.browsers = Array.from(browsers.values()).map(b => {
return { name: b.name, version: b.version };
});
metadata.system = {
platform: system.platform,
release: system.release,
arch: system.arch
};
metadata.system = system;
writeFileSync(metadataPath, `${JSON.stringify(metadata, undefined, '\t')}\n`);
}

const { previous: gc, ...previous } = metadata.system;

Check failure on line 77 in src/server/visual-diff-reporter.js

View workflow job for this annotation

GitHub Actions / Test

'gc' is assigned a value but never used
system.previous = previous;

return { browsers, files, numByteDiff, numFailed, numTests, system };

}
Expand Down

0 comments on commit 7104f8e

Please sign in to comment.