Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Gord Tanner committed Sep 10, 2010
0 parents commit 17f6ddf
Show file tree
Hide file tree
Showing 8 changed files with 1,105 additions and 0 deletions.
9 changes: 9 additions & 0 deletions LICENSE
@@ -0,0 +1,9 @@
** Licensed Under **

The MIT License
http://www.opensource.org/licenses/mit-license.php

Copyright (c) 2010 all contributors:

Gord Tanner
tinyHippos Inc.
7 changes: 7 additions & 0 deletions README
@@ -0,0 +1,7 @@
jWorkflow is a workflow engine for JavaScript that provides the ability to
create workflows to chain methods together in an easy to understand syntax.


Contributers:

Gord Tanner <gord@tinyhippos.com>
17 changes: 17 additions & 0 deletions jworkflow.js
@@ -0,0 +1,17 @@
// jWorkflow.js
// (c) 2010 tinyHippos inc.
// Underscore is freely distributable under the terms of the MIT license.
// Portions of jWorkflow are inspired by or borrowed from Underscore.js
jWorkflow = (function() {
var self = {
order: function (func) {
return {};
},

start: function (order) {
//start the order
}
};

return self;
})();
17 changes: 17 additions & 0 deletions test/test.html
@@ -0,0 +1,17 @@
<!DOCTYPE HTML>
<html>
<head>
<title>jWorkflow Test Suite</title>
<link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen" />
<script type="text/javascript" src="vendor/jquery.js"></script>
<script type="text/javascript" src="vendor/qunit.js"></script>
<script type="text/javascript" src="../jworkflow.js"></script>
<script type="text/javascript" src="test_jworkflow.js"></script>
</head>
<body>
<h1 id="qunit-header">jWorkflow Test Suite</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
</body>
</html>
22 changes: 22 additions & 0 deletions test/test_jworkflow.js
@@ -0,0 +1,22 @@
$(document).ready(function () {
module("jWorkflow ordering and starting workflows");

test("jWorkflow: we can place an order", function() {
expect(1);
var order = jWorkflow.order(function () {});
ok(order, "we should have an order");
});

test("jWorkflow: it throws an error when order is not a function", function() {
var errored = false;
try {
jWorkflow.order(34);
}
catch (ex) {
errored = true;
}

ok(errored, "expected an error");

});
});
19 changes: 19 additions & 0 deletions test/vendor/jquery.js

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions test/vendor/qunit.css
@@ -0,0 +1,17 @@
h1#qunit-header, h1.qunit-header { padding: 15px; font-size: large; background-color: #06b; color: white; font-family: 'trebuchet ms', verdana, arial; margin: 0; }
h1#qunit-header a { color: white; }

h2#qunit-banner { height: 2em; border-bottom: 1px solid white; background-color: #eee; margin: 0; font-family: 'trebuchet ms', verdana, arial; }
h2#qunit-banner.pass { background-color: green; }
h2#qunit-banner.fail { background-color: red; }

h2#qunit-userAgent, h2.qunit-userAgent { padding: 10px; background-color: #eee; color: black; margin: 0; font-size: small; font-weight: normal; font-family: 'trebuchet ms', verdana, arial; font-size: 10pt; }

div#qunit-testrunner-toolbar { background: #eee; border-top: 1px solid black; padding: 10px; font-family: 'trebuchet ms', verdana, arial; margin: 0; font-size: 10pt; }

ol#qunit-tests { font-family: 'trebuchet ms', verdana, arial; font-size: 10pt; }
ol#qunit-tests li strong { cursor:pointer; }
ol#qunit-tests .pass { color: green; }
ol#qunit-tests .fail { color: red; }

p#qunit-testresult { margin-left: 1em; font-size: 10pt; font-family: 'trebuchet ms', verdana, arial; }

0 comments on commit 17f6ddf

Please sign in to comment.