This repository has been archived by the owner on Aug 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marlow Payne
committed
Jan 13, 2016
1 parent
8561932
commit 4d3984a
Showing
11 changed files
with
81 additions
and
82 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
var nightwatch = require('../node_modules/nightwatch'); | ||
|
||
module.exports = { | ||
init : function(callback) { | ||
return nightwatch.client({ | ||
// desiredCapabilities: { | ||
// browserName: 'chrome' | ||
// }, | ||
custom_commands_path: '../commands', | ||
custom_assertions_path: '../assertions', | ||
selenium_port : 10195, | ||
silent : true, | ||
output : false | ||
}).start().once('error', function() { | ||
if (callback) { | ||
callback(); | ||
} | ||
process.exit(); | ||
}); | ||
} | ||
init : function(callback) { | ||
return nightwatch.client({ | ||
// desiredCapabilities: { | ||
// browserName: 'chrome' | ||
// }, | ||
/* eslint-disable camelcase */ | ||
custom_commands_path: '../commands', | ||
custom_assertions_path: '../assertions', | ||
selenium_port : 10195, | ||
/* eslint-enable camelcase */ | ||
silent : true, | ||
output : false | ||
}).start().once('error', function() { | ||
if (callback) { | ||
callback(); | ||
} | ||
process.exit(); | ||
}); | ||
} | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,35 @@ | ||
try { | ||
var args = process.argv, reporter_type = 'default'; | ||
var reporters = require('nodeunit').reporters; | ||
var args = process.argv, reporterType = 'default'; | ||
var reporters = require('nodeunit').reporters; | ||
|
||
if (args.length == 3) { | ||
reporter_type = args[2]; | ||
if (args.length === 3) { | ||
reporterType = args[2]; | ||
|
||
if (!(reporter_type in reporters)) { | ||
console.error('Invalid reporter_type specified', reporter_type); | ||
process.exit(); | ||
if (!(reporterType in reporters)) { | ||
console.error('Invalid reporterType specified', reporterType); | ||
process.exit(); | ||
} | ||
} | ||
} | ||
|
||
var reporter = reporters[reporter_type]; | ||
var options = require('./nodeunit.json'); | ||
} | ||
catch(e) { | ||
console.log(e); | ||
console.log('Cannot find nodeunit module.'); | ||
process.exit(); | ||
var reporter = reporters[reporterType]; | ||
var options = require('./nodeunit.json'); | ||
} catch (e) { | ||
console.log(e); | ||
console.log('Cannot find nodeunit module.'); | ||
process.exit(); | ||
} | ||
|
||
process.chdir(__dirname); | ||
|
||
try { | ||
var server = require('mockserver').init(); | ||
server.on('listening', function() { | ||
reporter.run(['src'], options, function() { | ||
server.close(); | ||
var server = require('mockserver').init(); | ||
server.on('listening', function() { | ||
reporter.run(['src'], options, function() { | ||
server.close(); | ||
}); | ||
}); | ||
}); | ||
|
||
|
||
//reporter.run(['src/commands'], options); | ||
//reporter.run(['src/commands'], options); | ||
} catch (err) { | ||
console.log(err); | ||
process.exit(); | ||
console.log(err); | ||
process.exit(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
module.exports = { | ||
setUp: function (callback) { | ||
setUp: function(callback) { | ||
callback(); | ||
}, | ||
|
||
|