Browse files

fix some typo, add todo

  • Loading branch information...
1 parent 17202e9 commit d5d5395f7258e8851c19bae64790fe16d3c5e48a @waka committed Feb 7, 2013
Showing with 25 additions and 14 deletions.
  1. +1 −0 .gitignore
  2. +2 −0 .npmignore
  3. +1 −1 bin/closure-library-phantomjs
  4. +3 −2 lib/adapter.js
  5. +3 −3 lib/closure-library-phantomjs.js
  6. +15 −8 lib/reporters.js
View
1 .gitignore
@@ -1,4 +1,5 @@
/node_modules
+deps.js
.DS_Store
*~
View
2 .npmignore
@@ -1,6 +1,8 @@
node_modules
npm-debug.log
+deps.js
+
.git
.gitignore
View
2 bin/closure-library-phantomjs
@@ -170,7 +170,7 @@ phantomjs.stdout.on('data', function(data) {
// Oops
phantomjs.on('exit', function(code) {
if (code === 127) {
- util.print("Perhaps phantomjs is not installed?\n");
+ util.print('Perhaps phantomjs is not installed?\n');
}
process.exit(code);
})
View
5 lib/adapter.js
@@ -42,7 +42,7 @@
global.goog.testing.TestCase.prototype.runTests = function() {
var data = {
name: this.name_,
- num: this.getCount(),
+ num: this.getCount()
};
sendToPhantomJS('head', data);
@@ -163,7 +163,8 @@
*
* @override
*/
- goog.testing.MultiTestRunner.TestFrame.prototype.onIframeLoaded_ = function(e) {
+ goog.testing.MultiTestRunner.TestFrame.prototype.onIframeLoaded_ =
+ function(e) {
this.iframeLoaded_ = true;
var js = goog.dom.getFrameContentWindow(this.iframeEl_);
View
6 lib/closure-library-phantomjs.js
@@ -50,12 +50,12 @@ function exitOnError(msg, trace) {
/**
* Wait timeout.
*
- * @param {number=} opt_timeout
+ * @param {number=} opt_timeout .
* @return {number} .
*/
function waitTimeout(opt_timeout) {
// Default max timeout is 600s
- var timeout = opt_timeout || DEFAULT_TIMEOUT;;
+ var timeout = opt_timeout || DEFAULT_TIMEOUT;
var timer = setTimeout(function() {
console.log('PHANTOM_JS: Timeout');
@@ -179,7 +179,7 @@ page.open(testPath, function(status) {
if (status === 'success') {
waitTimer = waitTimeout(config.timeout);
} else {
- console.log("phantomjs: Unable to load page. [" + testPath + ']');
+ console.log('phantomjs: Unable to load page. [' + testPath + ']');
phantom.exit(1);
}
});
View
23 lib/reporters.js
@@ -9,7 +9,7 @@
*/
var fs = require('fs');
-var os = require('system').os;
+var system = require('system');
/**
@@ -29,9 +29,9 @@ var Colors = {
* Symbols of console.
*/
var Symbols = {
- OK: (os.name === 'windows') ? '\u221A' : '',
- NG: (os.name === 'windows') ? '\u00D7' : '',
- DOT: '.',
+ OK: (system.os.name === 'windows') ? '\u221A' : '',
+ NG: (system.os.name === 'windows') ? '\u00D7' : '',
+ DOT: '.'
};
@@ -63,7 +63,7 @@ function gray(str) {
/**
* @interface
*/
-function IReporter() {};
+function IReporter() {}
/**
* @param {Object} testcase .
@@ -95,12 +95,15 @@ function DotReporter() {
errors: []
};
console.log('');
+
+ // TODO after 1.9 released, use system module
fs.write('/dev/stdout', ' ', 'w');
+ //system.stdout.write(' ');
}
/**
* @type {Object}
- * @private/
+ * @private
*/
DotReporter.prototype.stats_;
@@ -119,9 +122,13 @@ DotReporter.prototype.writeResult = function(result) {
result.error && this.stats_.errors.push(result.error);
if (result.success) {
+ // TODO after 1.9 released, use system module
fs.write('/dev/stdout', gray(Symbols.DOT), 'w');
+ //system.stdout.write(gray(Symbols.DOT));
} else {
+ // TODO after 1.9 released, use system module
fs.write('/dev/stdout', red(Symbols.DOT), 'w');
+ //system.stdout.write(red(Symbols.DOT));
}
};
@@ -180,7 +187,7 @@ function SpecReporter() {
/**
* @type {Object}
- * @private/
+ * @private
*/
SpecReporter.prototype.stats_;
@@ -265,7 +272,7 @@ function TapReporter() {
/**
* @type {Object}
- * @private/
+ * @private
*/
TapReporter.prototype.stats_;

0 comments on commit d5d5395

Please sign in to comment.