mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 07:21:43 +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() {}
|
||||
|
||||
//Snegopat.
|
||||
// TODO: ðåàëèçîâàòü ïîëíîöåííûé òðåéñåð/ëîããåð.
|
||||
function trace(message, value, marker) {
|
||||
var text = message;
|
||||
|
||||
|
@ -695,7 +693,6 @@ function trace(message, value, marker) {
|
|||
|
||||
WScript.Echo(text);
|
||||
}
|
||||
/////Snegopat.
|
||||
|
||||
function warn() {
|
||||
trace(arguments[0], arguments[1]);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"start": "start.bat",
|
||||
"test": "cscript app.js helloworld"
|
||||
"test": "cscript app.js testloader"
|
||||
},
|
||||
"repository": {
|
||||
"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