Skip to content

Commit

Permalink
PR feedback :)
Browse files Browse the repository at this point in the history
Remove warnings by adding transform regex to `ts-jest` and `testMatch`.
  • Loading branch information
mmaietta committed Feb 11, 2025
1 parent 97414ca commit 5cb9e93
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
11 changes: 6 additions & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
transform: {
'.': [
'^.+\\.ts?$': [
'ts-jest',
{
tsconfig: 'tsconfig.jest.json'
}
]
tsconfig: 'tsconfig.jest.json',
},
],
},
testMatch: ['<rootDir>/test/**/*.spec.ts'],
globalSetup: './jest.setup.ts',
testTimeout: 10000,
};
};
4 changes: 2 additions & 2 deletions test/util.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { readArchiveHeaderSync } from '@electron/asar/lib/disk';
import { downloadArtifact } from '@electron/get';
import { spawn } from '@malept/cross-spawn-promise';
import * as zip from 'cross-zip';
import * as fs from 'fs-extra';
import * as path from 'path';
import plist from 'plist';
import * as fileUtils from '../dist/cjs/file-utils';
import { getRawHeader } from '@electron/asar';

// We do a LOT of verifications in `verifyApp` 😅
// exec universal binary -> verify ALL asars -> verify ALL app dirs -> verify ALL asar integrity entries
Expand All @@ -25,7 +25,7 @@ export const verifyApp = async (appPath: string) => {
const asars = resourcesDirContents.filter((p) => p.endsWith('.asar')).sort();
for await (const asar of asars) {
// verify header
const asarFs = readArchiveHeaderSync(path.resolve(resourcesDir, asar));
const asarFs = getRawHeader(path.resolve(resourcesDir, asar));
expect(removeUnstableProperties(asarFs.header)).toMatchSnapshot();
}

Expand Down
10 changes: 0 additions & 10 deletions typings/asar.d.ts

This file was deleted.

0 comments on commit 5cb9e93

Please sign in to comment.