-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bump chai and chai-as-promised (#182)
- Loading branch information
1 parent
15b65c7
commit bafda88
Showing
13 changed files
with
94 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
import chai from 'chai'; | ||
import chaiAsPromised from 'chai-as-promised'; | ||
import { findDeveloperImage } from '../../lib/imagemounter/utils/list_developer_image'; | ||
import { fs } from '@appium/support'; | ||
chai.should(); | ||
chai.use(chaiAsPromised); | ||
|
||
|
||
describe('findDeveloperImage', function () { | ||
it('should download and return the correct developer image for a given version', async function () { | ||
const result = await findDeveloperImage('14.7.1', { | ||
githubRepo: 'appium/appium-ios-device', | ||
subFolderList: ['test', 'imagemounter'], | ||
branch: 'master' | ||
}); | ||
result.developerImage.endsWith('/DeveloperDiskImage.dmg').should.be.true; | ||
result.developerImageSignature.endsWith('/DeveloperDiskImage.dmg.signature').should.be.true; | ||
(await fs.exists(result.developerImage)).should.be.true; | ||
(await fs.exists(result.developerImageSignature)).should.be.true; | ||
}); | ||
let chai; | ||
|
||
it('should throw an error if the developer image cannot be found', function () { | ||
findDeveloperImage('99.99.99', { | ||
githubRepo: 'appium/appium-ios-device', | ||
subFolderList: ['test', 'imagemounter'] | ||
}).should.be.rejectedWith('Failed to get developer image for iOS 99.99'); | ||
before(async function () { | ||
chai = await import('chai'); | ||
const chaiAsPromised = await import('chai-as-promised'); | ||
chai.should(); | ||
chai.use(chaiAsPromised.default); | ||
}); | ||
|
||
it('should download and return the correct developer image for a given version', async function () { | ||
const result = await findDeveloperImage('14.7.1', { | ||
githubRepo: 'appium/appium-ios-device', | ||
subFolderList: ['test', 'imagemounter'], | ||
branch: 'master' | ||
}); | ||
result.developerImage.endsWith('/DeveloperDiskImage.dmg').should.be.true; | ||
result.developerImageSignature.endsWith('/DeveloperDiskImage.dmg.signature').should.be.true; | ||
(await fs.exists(result.developerImage)).should.be.true; | ||
(await fs.exists(result.developerImageSignature)).should.be.true; | ||
}); | ||
|
||
it('should throw an error if the developer image cannot be found', function () { | ||
findDeveloperImage('99.99.99', { | ||
githubRepo: 'appium/appium-ios-device', | ||
subFolderList: ['test', 'imagemounter'] | ||
}).should.be.rejectedWith('Failed to get developer image for iOS 99.99'); | ||
}); | ||
}); |
10 changes: 6 additions & 4 deletions
10
test/installation-proxy/installation-proxy-service-specs.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters