diff --git a/package.json b/package.json index f1f0af2..3ca3ad5 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "mocha": "xvfb-maybe electron-mocha --reporter spec && mocha --reporter spec", "test": "yarn lint && yarn mocha", "lint": "yarn prettier:check", - "prettier": "prettier \"src/**/*.ts\" \"test/**/*.ts\" \"test/**/*.js\"", + "prettier": "prettier \"src/**/*.ts\" \"test/**/*.js\"", "prettier:check": "yarn prettier --check", "prettier:write": "yarn prettier --write", "prepare": "tsc" diff --git a/test/index.test-d.ts b/test/index.test-d.ts deleted file mode 100644 index 6646534..0000000 --- a/test/index.test-d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import * as asar from '..'; -import * as fs from 'fs'; -import * as crypto from 'crypto'; -import { expectType } from 'tsd'; - -await asar.createPackage('bin', 'tmp/foo.asar'); -await asar.createPackageWithOptions('bin', 'tmp/foo.asar', { - dot: true, - globOptions: { - debug: true, - }, - transform: (filePath: string) => { - if (process.env.TRANSFORM_ASAR) { - return crypto - .createCipheriv('aes-256-cbc', crypto.randomBytes(32), crypto.randomBytes(16)) - .setAutoPadding(true) - .setEncoding('base64'); - } - }, -}); -await asar.createPackageFromFiles('bin', 'tmp/foo.asar', ['bin/asar.js']); -const stat = fs.statSync('bin/asar.js'); -await asar.createPackageFromFiles('bin', 'tmp/foo.asar', ['bin/asar.js'], { - 'bin/asar.js': { - type: 'file', - stat, - }, -}); - -expectType(asar.statFile('tmp/foo.asar', 'bin/asar.js')); -expectType(asar.statFile('tmp/foo.asar', 'bin/asar.js', false)); - -expectType(asar.listPackage('tmp/foo.asar')); -expectType(asar.listPackage('tmp/foo.asar', { isPack: true })); - -expectType(asar.extractFile('tmp/foo.asar', 'bin/asar.js')); - -asar.extractAll('tmp/foo.asar', 'tmp'); - -expectType(asar.uncache('tmp/foo.asar')); - -asar.uncacheAll();