diff options
author | Mike Gerwitz <gerwitm@lovullo.com> | 2016-03-01 00:48:36 -0500 |
---|---|---|
committer | Mike Gerwitz <gerwitm@lovullo.com> | 2016-03-01 00:48:37 -0500 |
commit | 78c3cc63e169eeeec6f48034037367ce89aee58f (patch) | |
tree | fdf7e56fb11da6276b4f16a6d277c1bc39b9b059 | |
parent | 578c064538bed3a65a6f52653ab6d32d6e24ddc0 (diff) | |
download | liza-78c3cc63e169eeeec6f48034037367ce89aee58f.tar.gz liza-78c3cc63e169eeeec6f48034037367ce89aee58f.tar.bz2 liza-78c3cc63e169eeeec6f48034037367ce89aee58f.zip |
add es6-promise shim
It is expected that support for promises will be available in whatever
environment liza is run. Here, we're adding a shim for the sake of testing
in ancient environments.
It's almost as if I'm stuck using an ancient environment somewhere...*cough*
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | package.json.in | 3 | ||||
-rw-r--r-- | test/pre.js | 23 |
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(); |