mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-07 12:16:04 +00:00
Update test-driven components
This commit is contained in:
parent
b8fe0ba198
commit
bff8a2c42a
|
@ -1,3 +0,0 @@
|
||||||
exports.main: function() {
|
|
||||||
console.log("Hello world");
|
|
||||||
};
|
|
|
@ -685,8 +685,6 @@ function setUp() {}
|
||||||
*/
|
*/
|
||||||
function tearDown() {}
|
function tearDown() {}
|
||||||
|
|
||||||
//Snegopat.
|
|
||||||
// TODO: ðåàëèçîâàòü ïîëíîöåííûé òðåéñåð/ëîããåð.
|
|
||||||
function trace(message, value, marker) {
|
function trace(message, value, marker) {
|
||||||
var text = message;
|
var text = message;
|
||||||
|
|
||||||
|
@ -695,7 +693,6 @@ function trace(message, value, marker) {
|
||||||
|
|
||||||
WScript.Echo(text);
|
WScript.Echo(text);
|
||||||
}
|
}
|
||||||
/////Snegopat.
|
|
||||||
|
|
||||||
function warn() {
|
function warn() {
|
||||||
trace(arguments[0], arguments[1]);
|
trace(arguments[0], arguments[1]);
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "start.bat",
|
"start": "start.bat",
|
||||||
"test": "cscript app.js helloworld"
|
"test": "cscript app.js testloader"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
19
test/test.example.js
Normal file
19
test/test.example.js
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
(function() {
|
||||||
|
return {
|
||||||
|
setUp: function() {
|
||||||
|
inform('Starting...');
|
||||||
|
},
|
||||||
|
|
||||||
|
tearDown: function() {
|
||||||
|
inform('Finishing...')
|
||||||
|
},
|
||||||
|
|
||||||
|
testGreenTest: function () {
|
||||||
|
assert("this is true", true);
|
||||||
|
},
|
||||||
|
|
||||||
|
testRedTest: function () {
|
||||||
|
assert("this is false", false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
8
testloader.js
Normal file
8
testloader.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
// Testloader
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
var JsUnit = require("lib/jsunit").JsUnit;
|
||||||
|
|
||||||
|
exports.main = function(args) {
|
||||||
|
JsUnit.Runner.run("test");
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user