Commit 8921ccec by Arnout Kazemier

[travis] Only use our API key for travis so less builds fail.

Relevant discussion: #6
parent 8b37b088
language: node_js language: node_js
node_js: node_js:
- "0.10" - "0.10"
- "0.11"
script:
- "npm run test-travis"
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
"main": "index.js", "main": "index.js",
"keywords": ["fullcontact", "api", "full", "contact"], "keywords": ["fullcontact", "api", "full", "contact"],
"scripts": { "scripts": {
"test": "API_KEY=506d9c8a7aafae5a NODE_ENV=testing ./node_modules/.bin/mocha $(find test -name '*.test.js')" "test": "NODE_ENV=testing ./node_modules/.bin/mocha $(find test -name '*.test.js')",
"test-travis": "API_KEY=506d9c8a7aafae5a NODE_ENV=testing ./node_modules/.bin/mocha $(find test -name '*.test.js')"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
......
...@@ -11,6 +11,7 @@ describe('FullContact.Email', function () { ...@@ -11,6 +11,7 @@ describe('FullContact.Email', function () {
// The API key we use for testing. // The API key we use for testing.
// //
var key = process.env.API_KEY; var key = process.env.API_KEY;
if (!key) throw new Error('Please provide your API using the API_KEY env variable.');
// //
// Some of the requests take a really long time, so set a really long timeout // Some of the requests take a really long time, so set a really long timeout
......
...@@ -11,6 +11,7 @@ describe('FullContact', function () { ...@@ -11,6 +11,7 @@ describe('FullContact', function () {
// The API key we use for testing. // The API key we use for testing.
// //
var key = process.env.API_KEY; var key = process.env.API_KEY;
if (!key) throw new Error('Please provide your API using the API_KEY env variable.');
// //
// Some of the requests take a really long time, so set a really long timeout // Some of the requests take a really long time, so set a really long timeout
......
...@@ -11,6 +11,7 @@ describe('FullContact.Location', function () { ...@@ -11,6 +11,7 @@ describe('FullContact.Location', function () {
// The API key we use for testing. // The API key we use for testing.
// //
var key = process.env.API_KEY; var key = process.env.API_KEY;
if (!key) throw new Error('Please provide your API using the API_KEY env variable.');
// //
// Some of the requests take a really long time, so set a really long timeout // Some of the requests take a really long time, so set a really long timeout
......
...@@ -11,6 +11,7 @@ describe('FullContact.Name', function () { ...@@ -11,6 +11,7 @@ describe('FullContact.Name', function () {
// The API key we use for testing. // The API key we use for testing.
// //
var key = process.env.API_KEY; var key = process.env.API_KEY;
if (!key) throw new Error('Please provide your API using the API_KEY env variable.');
// //
// Some of the requests take a really long time, so set a really long timeout // Some of the requests take a really long time, so set a really long timeout
......
...@@ -11,6 +11,7 @@ describe('FullContact.Person', function () { ...@@ -11,6 +11,7 @@ describe('FullContact.Person', function () {
// The API key we use for testing. // The API key we use for testing.
// //
var key = process.env.API_KEY; var key = process.env.API_KEY;
if (!key) throw new Error('Please provide your API using the API_KEY env variable.');
// //
// Some of the requests take a really long time, so set a really long timeout // Some of the requests take a really long time, so set a really long timeout
......
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