Skip to content

Commit

Permalink
Test: check API key before doing anything else
Browse files Browse the repository at this point in the history
  • Loading branch information
fvdm committed Apr 13, 2016
1 parent af2c601 commit df66aad
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,25 @@ var app = require ('./');


// Setup
var ovio = app ({
var config = {
apikey: process.env.OVIO_APIKEY || null,
timeout: process.env.OVIO_TIMEOUT || 5000,
dataset: 'voertuiggegevens'
};

var ovio = app (config);


// Tests
dotest.add ('API key', function () {
if (!config.apikey) {
dotest.log ('OVIO_APIKEY is not set');
dotest.exit ();
} else {
dotest.log ('good', 'OVIO_APIKEY key is set');
dotest.test ()
.done ();
}
});


Expand Down

0 comments on commit df66aad

Please sign in to comment.