From d93838edfe4bbc3d8697a7e4d238cd4f89826fa6 Mon Sep 17 00:00:00 2001 From: Sam Stern Date: Fri, 2 Mar 2018 13:55:52 -0800 Subject: [PATCH] Enable tests, ignore compiled files --- .travis.yml | 2 +- es2017-transpile/functions/.gitignore | 1 + lerna.json | 2 +- paypal/.gitignore | 2 +- quickstarts/uppercase-firestore/functions/package.json | 1 - quickstarts/uppercase/functions/package.json | 3 ++- scripts/test.sh | 5 +++-- 7 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 es2017-transpile/functions/.gitignore diff --git a/.travis.yml b/.travis.yml index ba006d4103..1b81a436ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,4 @@ install: - npm install -g typescript - npm install -g tslint script: - - ./scripts/test.sh \ No newline at end of file + - ./scripts/test.sh diff --git a/es2017-transpile/functions/.gitignore b/es2017-transpile/functions/.gitignore new file mode 100644 index 0000000000..012a3cd689 --- /dev/null +++ b/es2017-transpile/functions/.gitignore @@ -0,0 +1 @@ +index.js diff --git a/lerna.json b/lerna.json index 96e333ceb9..9bafc15969 100644 --- a/lerna.json +++ b/lerna.json @@ -58,4 +58,4 @@ "username-password-auth/functions" ], "version": "1.0.0" -} \ No newline at end of file +} diff --git a/paypal/.gitignore b/paypal/.gitignore index 528b7a38ee..5cb42bd488 100644 --- a/paypal/.gitignore +++ b/paypal/.gitignore @@ -1,2 +1,2 @@ firebase-debug.log -functions/eslintrc.js \ No newline at end of file +functions/eslintrc.js diff --git a/quickstarts/uppercase-firestore/functions/package.json b/quickstarts/uppercase-firestore/functions/package.json index 3ac944555e..aa24cef195 100644 --- a/quickstarts/uppercase-firestore/functions/package.json +++ b/quickstarts/uppercase-firestore/functions/package.json @@ -14,7 +14,6 @@ "sinon": "^1.17.7" }, "scripts": { - "test": "./node_modules/.bin/mocha --reporter spec", "lint": "./node_modules/.bin/eslint --max-warnings=0 .", "serve": "firebase serve --only functions", "shell": "firebase experimental:functions:shell", diff --git a/quickstarts/uppercase/functions/package.json b/quickstarts/uppercase/functions/package.json index af74d91579..d061da0da9 100644 --- a/quickstarts/uppercase/functions/package.json +++ b/quickstarts/uppercase/functions/package.json @@ -12,7 +12,8 @@ "sinon": "^4.1.3" }, "scripts": { - "test": "./node_modules/.bin/mocha --reporter spec", + "build": "npm install", + "test": "npm run build && ./node_modules/.bin/mocha --reporter spec", "lint": "./node_modules/.bin/eslint --max-warnings=0 .", "serve": "firebase serve --only functions", "shell": "firebase experimental:functions:shell", diff --git a/scripts/test.sh b/scripts/test.sh index 566308ad86..fb6842614f 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -2,5 +2,6 @@ echo "Linting..." lerna run lint -# TODO: run tests -# 'lerna bootstrap' takes too long on travis so not sure how to do this \ No newline at end of file +# Run tests +echo "Testing..." +lerna run test