-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #161 from KazuCocoa/fix-get-biometric
fix getting biometric
- Loading branch information
Showing
2 changed files
with
43 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// transpile:mocha | ||
|
||
import chai from 'chai'; | ||
import chaiAsPromised from 'chai-as-promised'; | ||
import SimulatorXcode9 from "../../lib/simulator-xcode-9"; | ||
|
||
chai.should(); | ||
chai.use(chaiAsPromised); | ||
|
||
const XCODE_VERSION_9 = { | ||
versionString: '9.0', | ||
versionFloat: 9.0, | ||
major: 9, | ||
minor: 0, | ||
patch: undefined | ||
}; | ||
|
||
describe('SimulatorXcode9', function () { | ||
let simulatorXcode9; | ||
|
||
beforeEach(function () { | ||
simulatorXcode9 = new SimulatorXcode9('1234', XCODE_VERSION_9); | ||
}); | ||
|
||
describe('getBiometric', function () { | ||
it('return touch id object', async function () { | ||
simulatorXcode9.getBiometric('touchId').should.eql({ menuName: 'Touch Id' }); | ||
}); | ||
|
||
it('raise an error since the argument does not exist in biometric', async function () { | ||
(function () { | ||
simulatorXcode9.getBiometric('no-touchId'); | ||
}).should.throw(Error, 'no-touchId is not a valid biometric. Use one of: ["touchId","faceId"]'); | ||
}); | ||
}); | ||
}); |