Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/js/tests.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/js/tests.js')
-rwxr-xr-xtests/js/tests.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/js/tests.js b/tests/js/tests.js
new file mode 100755
index 0000000..aa0136f
--- /dev/null
+++ b/tests/js/tests.js
@@ -0,0 +1,31 @@
+ $(document).ready(
+ function(){
+ //bwb: these are helpers I have written, you may find them useful
+ var hasProperties = function (properties) {
+ for (var prop in properties) {
+ if (!this[prop]){
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+ };
+
+ var shouldError = function ( cb ){
+ try {
+ cb();
+ }
+ catch (e) {
+ return true;
+ }
+ return false;
+ };
+
+ var shouldNotError = function ( cb ) {
+ return !shouldError( cb );
+ };
+
+ // Your test code here
+
+ }); \ No newline at end of file