Created
October 27, 2014 22:30
-
-
Save Jonahss/ab2e085feb63956bb9e6 to your computer and use it in GitHub Desktop.
wd-asserter-fail
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
"use strict"; | |
var wd = require('wd'); | |
var Asserter = require('wd').Asserter; | |
var Q = require('q') | |
describe("gpsDemo - location @skip-real-device", function () { | |
var driver; | |
var driver = wd.promiseChainRemote({hostname: "localhost",port: 4723}); | |
var caps = { | |
"deviceName": "iPhone Simulator", | |
"app": "/Users/jonahss/Workspace/appium/sample-code/apps/TestApp/build/Release-iphonesimulator/TestApp.app", | |
"platformVersion": "8.1", | |
"newCommandTimeout": 100000, | |
"platformName":"iOS", | |
"keepKeyChains": true, | |
"fullReset": true | |
} | |
it('should fail with asserter', function (done) { | |
var asserter = new Asserter( | |
function() { | |
return Q.reject('failed') | |
} | |
); | |
driver | |
.init(caps) | |
.waitFor(asserter) | |
.then(function () { | |
"hi there".should.be.ok | |
}) | |
.nodeify(done); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment