Commit 6296c528 by Dane Springmeyer

ensure the test db is created if the user only runs npm test

parent 113c3719
...@@ -11,6 +11,8 @@ db: ...@@ -11,6 +11,8 @@ db:
@if ! [ -f test/support/big.db ]; then \ @if ! [ -f test/support/big.db ]; then \
echo "Creating test database... This may take several minutes." ; \ echo "Creating test database... This may take several minutes." ; \
node test/support/createdb.js ; \ node test/support/createdb.js ; \
else \
echo "okay: database already created" ; \
fi fi
test: build db test: build db
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
"node": ">= 0.6.13 && < 0.11.0" "node": ">= 0.6.13 && < 0.11.0"
}, },
"scripts": { "scripts": {
"pretest":"make db",
"test": "mocha -R spec" "test": "mocha -R spec"
}, },
"licenses": [{ "type": "BSD" }], "licenses": [{ "type": "BSD" }],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment