test(electron): theme check (#2182)

This commit is contained in:
Himself65
2023-04-28 01:40:44 -05:00
committed by GitHub
parent 73d5b2081a
commit ef0521fa2a
6 changed files with 64 additions and 31 deletions

View File

@@ -1,10 +1,18 @@
import { ok } from 'node:assert';
import crypto from 'node:crypto';
import fs from 'node:fs';
import path from 'node:path';
import path, { resolve } from 'node:path';
import process from 'node:process';
import { test as baseTest } from '@playwright/test';
export const rootDir = resolve(__dirname, '..', '..');
// assert that the rootDir is the root of the project
// eslint-disable-next-line @typescript-eslint/no-var-requires
ok(require(resolve(rootDir, 'package.json')).name.toLowerCase() === 'affine');
export const testResultDir = resolve(rootDir, 'test-results');
const istanbulTempDir = process.env.ISTANBUL_TEMP_DIR
? path.resolve(process.env.ISTANBUL_TEMP_DIR)
: path.join(process.cwd(), '.nyc_output');