@@ -28,6 +28,8 @@ interface AssertPackOptions {
28
28
readonly packed ?: ( projectDir : string ) => Promise < any >
29
29
readonly expectedContents ?: Array < string >
30
30
readonly expectedArtifacts ?: Array < string >
31
+
32
+ readonly expectedDepends ?: string
31
33
}
32
34
33
35
export async function assertPack ( fixtureName : string , packagerOptions : PackagerOptions , checkOptions ?: AssertPackOptions ) : Promise < void > {
@@ -104,15 +106,15 @@ async function packAndCheck(projectDir: string, packagerOptions: PackagerOptions
104
106
await checkOsXResult ( packager , packagerOptions , checkOptions , artifacts . get ( Platform . OSX ) )
105
107
}
106
108
else if ( platform === Platform . LINUX ) {
107
- await checkLinuxResult ( projectDir , packager , packagerOptions )
109
+ await checkLinuxResult ( projectDir , packager , packagerOptions , checkOptions )
108
110
}
109
111
else if ( platform === Platform . WINDOWS ) {
110
112
await checkWindowsResult ( packager , packagerOptions , checkOptions , artifacts . get ( Platform . WINDOWS ) )
111
113
}
112
114
}
113
115
}
114
116
115
- async function checkLinuxResult ( projectDir : string , packager : Packager , packagerOptions : PackagerOptions ) {
117
+ async function checkLinuxResult ( projectDir : string , packager : Packager , packagerOptions : PackagerOptions , checkOptions : AssertPackOptions ) {
116
118
const productName = getProductName ( packager . metadata , packager . devMetadata )
117
119
const expectedContents = expectedLinuxContents . map ( it => {
118
120
if ( it === "/opt/TestApp/TestApp" ) {
@@ -142,6 +144,7 @@ async function checkLinuxResult(projectDir: string, packager: Packager, packager
142
144
Vendor : "Foo Bar <foo@example.com>" ,
143
145
Package : "testapp" ,
144
146
Description : " \n Test Application (test quite \" #378)" ,
147
+ Depends : checkOptions == null || checkOptions . expectedDepends == null ? "libappindicator1, libnotify" : checkOptions . expectedDepends ,
145
148
} )
146
149
}
147
150
0 commit comments