Permalink
Browse files

Adding project files, so there's something for the user to test

  • Loading branch information...
1 parent 40d6193 commit 46b06ff79e5e579e851297b8827acf1b223ea0e1 @mroderick committed Jan 6, 2012
Showing with 33 additions and 0 deletions.
  1. +8 −0 project/src/try-buster.js
  2. +13 −0 project/test/buster.js
  3. +12 −0 project/test/try-buster-test.js
View
8 project/src/try-buster.js
@@ -0,0 +1,8 @@
+/*jslint evil:false, sloppy:true, undef:true, white:true, plusplus:true */
+/*global buster, assert, TryBuster */
+
+var TryBuster = {
+ sayHello : function(){
+ return 'hello world!';
+ }
+};
View
13 project/test/buster.js
@@ -0,0 +1,13 @@
+/*jslint evil:false, sloppy:false, undef:true, white:true, plusplus:true, node:true */
+
+var config = module.exports;
+
+config["Try BusterJS tests"] = {
+ env: "browser",
+ sources: [
+ "../src/try-buster.js"
+ ],
+ tests: [
+ "*-test.js"
+ ]
+};
View
12 project/test/try-buster-test.js
@@ -0,0 +1,12 @@
+/*jslint evil:false, sloppy:true, undef:true, white:true, plusplus:true */
+/*global buster, assert, TryBuster */
+
+buster.testCase("TryBuster", {
+ "has a function named 'sayHello'": function () {
+ assert( TryBuster.hasOwnProperty('sayHello') && typeof TryBuster.sayHello === 'function' );
+ },
+
+ "sayHello returns 'hello world!'": function () {
+ assert.equals( TryBuster.sayHello(), 'hello world!' );
+ }
+});

0 comments on commit 46b06ff

Please sign in to comment.