Skip to content

Commit

Permalink
Small improvements to the browser test samples
Browse files Browse the repository at this point in the history
  • Loading branch information
alexyoung committed Jan 5, 2017
1 parent 52a42f8 commit 977571e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions ch10-testing/selenium/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const express = require('express');
const app = express();
const port = process.env.PORT || 4000;

app.get('/', (req, res) => {
res.send(`
Expand All @@ -14,6 +15,6 @@ app.get('/', (req, res) => {
`);
});

app.listen(process.env.PORT, () => {
console.log('Running on port', process.env.PORT);
app.listen(port, () => {
console.log('Running on port', port);
});
4 changes: 2 additions & 2 deletions ch10-testing/selenium/test/specs/todo.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const webdriverio = require('webdriverio');
describe('todo tests', () => {
let client;

before(function(){
before(() => {
client = webdriverio.remote();
return client.init();
});
Expand All @@ -14,6 +14,6 @@ describe('todo tests', () => {
return client
.url('/')
.getTitle()
.then(title => assert(title === 'My to-do list'));
.then(title => assert.equal(title, 'My to-do list'));
});
});

0 comments on commit 977571e

Please sign in to comment.