fix: Revert "feat: bump minimum node version to 16 and add tests (#86)"
This reverts commit 8e2842b4a3.
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
import * as path from 'path';
|
||||
|
||||
import { AsarMode, detectAsarMode, generateAsarIntegrity } from '../src/asar-utils';
|
||||
|
||||
const asarsPath = path.resolve(__dirname, 'fixtures', 'asars');
|
||||
const appsPath = path.resolve(__dirname, 'fixtures', 'apps');
|
||||
|
||||
describe('asar-utils', () => {
|
||||
describe('detectAsarMode', () => {
|
||||
it('should correctly detect an asar enabled app', async () => {
|
||||
expect(await detectAsarMode(path.resolve(appsPath, 'Asar.app'))).toBe(AsarMode.HAS_ASAR);
|
||||
});
|
||||
|
||||
it('should correctly detect an app without an asar', async () => {
|
||||
expect(await detectAsarMode(path.resolve(appsPath, 'NoAsar.app'))).toBe(AsarMode.NO_ASAR);
|
||||
});
|
||||
});
|
||||
|
||||
describe('generateAsarIntegrity', () => {
|
||||
it('should deterministically hash an asar header', async () => {
|
||||
expect(generateAsarIntegrity(path.resolve(asarsPath, 'app.asar')).hash).toEqual(
|
||||
'85fff474383bd8df11cd9c5784e8fcd1525af71ff140a8a882e1dc9d5b39fcbf',
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user