diff --git a/.travis.yml b/.travis.yml index 2fce81e..f7fe068 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ sudo: false language: node_js node_js: - - "4" + - "6" script: - npm test diff --git a/package.json b/package.json index 00b64fa..0c47a33 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "devDependencies": { "jasmine": "2.4.1", "jshint": "2.5.0", - "selenium-webdriver": "^3.0.0-beta-3", + "selenium-webdriver": "^3.0.0", "typescript": "^2.0.0" }, "repository": { @@ -29,5 +29,8 @@ "test": "scripts/test.sh" }, "license": "MIT", + "engines": { + "node": ">= 6.9.0" + }, "version": "0.1.0-beta.0" } diff --git a/spec/adapterSpec.js b/spec/adapterSpec.js index 6fce99e..6d4722f 100644 --- a/spec/adapterSpec.js +++ b/spec/adapterSpec.js @@ -76,9 +76,9 @@ describe('webdriverJS Jasmine adapter', function() { it('should wait till the expect to run the flow', function() { var promiseA = fakeDriver.getValueA(); - expect(promiseA.isPending()).toBe(true); + expect(common.isPending(promiseA)).toBe(true); expect(promiseA).toEqual('a'); - expect(promiseA.isPending()).toBe(true); + expect(common.isPending(promiseA)).toBe(true); }); it('should compare a promise to a promise', function() { diff --git a/spec/common.js b/spec/common.js index efbd48f..6786640 100644 --- a/spec/common.js +++ b/spec/common.js @@ -123,3 +123,7 @@ exports.getMatchers = function() { } }; }; + +exports.isPending = function(managedPromise) { + return managedPromise.state_ === 'pending'; +};