Skip to content

Instantly share code, notes, and snippets.

@Jonahss
Created October 27, 2014 22:30
Show Gist options
  • Save Jonahss/ab2e085feb63956bb9e6 to your computer and use it in GitHub Desktop.
Save Jonahss/ab2e085feb63956bb9e6 to your computer and use it in GitHub Desktop.
wd-asserter-fail
"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