@@ -3,6 +3,7 @@ import { spawn } from "node:child_process";
33import * as path from "node:path" ;
44import * as fs from "node:fs" ;
55import { describe , it } from "mocha" ;
6+ import Applesign from "../index.js" ;
67
78const mochaTimeout = 15000 ;
89const developerCertificate = process . env . DEVCERT ;
@@ -25,6 +26,26 @@ describe("API", () => {
2526});
2627*/
2728
29+ describe ( "API" , ( ) => {
30+ describe ( "unzipIPA" , ( ) => {
31+ it ( "should fail when the input file is missing" , async ( ) => {
32+ const applesign = new Applesign ( { } ) ;
33+ await assert . rejects (
34+ applesign . unzipIPA ( "" , "tmp" ) ,
35+ / N o i n p u t f i l e s p e c i f i e d / ,
36+ ) ;
37+ } ) ;
38+
39+ it ( "should fail when the output directory is missing" , async ( ) => {
40+ const applesign = new Applesign ( { } ) ;
41+ await assert . rejects (
42+ applesign . unzipIPA ( "test.ipa" , "" ) ,
43+ / N o o u t p u t d i r e c t o r y s p e c i f i e d / ,
44+ ) ;
45+ } ) ;
46+ } ) ;
47+ } ) ;
48+
2849describe ( "Commandline" , ( ) => {
2950 describe ( "dist/bin/applesign.js" , ( ) => {
3051 it ( "should fail when applesign cannot be executed" , ( done ) => {
0 commit comments