From e5cd9531df84cc90e2fdd0bf5fbb41d6ff9c32a4 Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Tue, 27 Sep 2016 14:57:04 +0200
Subject: [PATCH] Add Unit Tests

---
 appveyor.yml        | 3 +++
 package.json        | 5 ++++-
 tests/unit_test1.js | 9 +++++++++
 3 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 tests/unit_test1.js

diff --git a/appveyor.yml b/appveyor.yml
index afe0ce1..d058363 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -11,3 +11,6 @@ install:
   - ps: Install-Product node $env:nodejs_version $env:platform
   - node -v
   - npm install
+
+test_script:
+  - npm test
diff --git a/package.json b/package.json
index fc518e1..911f7ba 100644
--- a/package.json
+++ b/package.json
@@ -23,12 +23,15 @@
     "underscore": "1.8.3"
   },
   "scripts": {
-    "postinstall": "node \"node_modules/bower/bin/bower\" install --allow-root && node \"node_modules/brunch/bin/brunch\" build && node cesium.js && mv cesium public/ && cp misc/cesium.js public/cesium/config.js"
+    "postinstall": "node \"node_modules/bower/bin/bower\" install --allow-root && node \"node_modules/brunch/bin/brunch\" build && node cesium.js && mv cesium public/ && cp misc/cesium.js public/cesium/config.js",
+    "test": "mocha --growl tests/"
   },
   "devDependencies": {
     "adm-zip": "0.4.7",
+    "mocha": "2.2.5",
     "process-nextick-args": "1.0.7",
     "request": "2.31.0",
+    "should": "11.1.0",
     "tmp": "0.0.29",
     "util-deprecate": "1.0.2"
   }
diff --git a/tests/unit_test1.js b/tests/unit_test1.js
new file mode 100644
index 0000000..409d30a
--- /dev/null
+++ b/tests/unit_test1.js
@@ -0,0 +1,9 @@
+
+const should = require('should');
+
+describe('Some unit test', () => {
+
+  it('should pass', () => {
+    "ABC".should.equal("ABC");
+  })
+});
-- 
GitLab