Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitm@lovullo.com>2016-03-01 00:49:54 -0500
committerMike Gerwitz <gerwitm@lovullo.com>2016-03-01 00:49:54 -0500
commit15d8bd607844b1801fab43916a5abd68eaec9f94 (patch)
treefdf7e56fb11da6276b4f16a6d277c1bc39b9b059
parent578c064538bed3a65a6f52653ab6d32d6e24ddc0 (diff)
parent78c3cc63e169eeeec6f48034037367ce89aee58f (diff)
downloadliza-15d8bd607844b1801fab43916a5abd68eaec9f94.tar.gz
liza-15d8bd607844b1801fab43916a5abd68eaec9f94.tar.bz2
liza-15d8bd607844b1801fab43916a5abd68eaec9f94.zip
es6-promise shim
-rw-r--r--Makefile.am5
-rw-r--r--package.json.in3
-rw-r--r--test/pre.js23
3 files changed, 28 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 8e8d673..ee3f93d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,7 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##
-path_src = $(top_builddir)/src
+path_src = $(top_builddir)/src
+path_test = $(top_builddir)/test
namespaces=$(shell find src -type d)
nsindex=$(addsuffix /index.js, $(namespaces))
@@ -37,6 +38,6 @@ modindex: $(nsindex)
test: check
check:
@PATH="$(PATH):$(CURDIR)/node_modules/mocha/bin" \
- mocha --recursive $(TESTARGS)
+ mocha --require $(path_test)/pre.js --recursive $(TESTARGS)
FORCE:
diff --git a/package.json.in b/package.json.in
index b0e714d..3742cba 100644
--- a/package.json.in
+++ b/package.json.in
@@ -19,7 +19,8 @@
},
"devDependencies": {
"chai": ">=1.9.1",
- "mocha": ">=1.18.2"
+ "mocha": ">=1.18.2",
+ "es6-promise": "~3"
},
"licenses": [
diff --git a/test/pre.js b/test/pre.js
new file mode 100644
index 0000000..5189391
--- /dev/null
+++ b/test/pre.js
@@ -0,0 +1,23 @@
+/**
+ * Pre-test setup
+ *
+ * Copyright (C) 2016 LoVullo Associates, Inc.
+ *
+ * This file is part of liza.
+ *
+ * liza is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// polyfill for ancient environments
+require( 'es6-promise' ).polyfill();