aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/search.js16
-rw-r--r--tests/search.js17
2 files changed, 17 insertions, 16 deletions
diff --git a/examples/search.js b/examples/search.js
index 92d8d65..982031c 100644
--- a/examples/search.js
+++ b/examples/search.js
@@ -81,20 +81,4 @@ function Search(searchBlock){ // searchBlock should be a Space object.
}
}
-let space = new Space();
-space.adhoc('jarvis');
-let test = new Search(space);
-let tile = new Space();
-tile.adhoc('\
- \n\
- jarvis \n\
- \n\
- \n\
- \n\
- \n\
- \n\
- \n\
-');
-console.log(test.add([2,2],tile));
-
module.exports = Search;
diff --git a/tests/search.js b/tests/search.js
new file mode 100644
index 0000000..4dd1655
--- /dev/null
+++ b/tests/search.js
@@ -0,0 +1,17 @@
+// Tests Search.js, in basic function.
+
+let space = new Space();
+space.adhoc('jarvis');
+let test = new Search(space);
+let tile = new Space();
+tile.adhoc('\
+ \n\
+ jarvis \n\
+ \n\
+ \n\
+ \n\
+ \n\
+ \n\
+ \n\
+');
+console.log(test.add([2,2],tile));