Initial commit
[yaffs-website] / node_modules / tiny-lr / test / wd / index.js
1 var wd     = require('wd');
2 var app    = require('../../examples/express/app');
3 var assert = require('assert');
4
5 var port = process.env.LR_PORT || process.env.PORT || 35729;
6
7 describe('mocha spec examples', function() {
8
9   this.timeout(10000);
10
11   describe('tinylr', function() {
12     var browser;
13
14     before(function(done) {
15       var browser = this.browser = wd.remote('localhost', process.env.WD_PORT || 9134);
16       browser.init(done)
17     });
18
19     before(function(done) {
20       this.server = app;
21       app.listen(port, done);
22     });
23
24     beforeEach(function(done) {
25       this.browser.get('http://localhost:' + port, done);
26     });
27
28     it('should retrieve the page title', function(done) {
29       this.browser.title(function(err, title) {
30         if (err) return done(err);
31         assert.equal(title, 'WD Tests');
32         done();
33       });
34     });
35
36     it('edit file, assert change');
37   });
38
39 });