Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

add production "sanity" check to Travis CI

Christopher Hiller84b181a46157
diff --git a/.travis.yml b/.travis.yml
index 8e11c3e3..29b4c419 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,6 +39,8 @@ matrix:
- node_js: '6'
env: TARGET=test-browser S3=1
+before_install: scripts/travis-before-install.sh
+
before_script: scripts/travis-before-script.sh
script: make $TARGET
diff --git a/scripts/travis-before-install.sh b/scripts/travis-before-install.sh
new file mode 100755
index 00000000..c725d389
--- /dev/null
+++ b/scripts/travis-before-install.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+npm install --production
+# this avoids our mocha.opts (and thus devDependencies) in a roundabout way
+./bin/mocha --opts /dev/null --reporter spec test/sanity/sanity.js
diff --git a/test/sanity/sanity.js b/test/sanity/sanity.js
new file mode 100644
index 00000000..59d58965
--- /dev/null
+++ b/test/sanity/sanity.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var assert = require('assert');
+
+describe('a production installation of Mocha', function() {
+ it('should be able to execute a test', function() {
+ assert.ok(true);
+ });
+});