Skip to content

Commit d12ca0f

Browse files
committed
fix test on travis ci
1 parent 0fc1a3a commit d12ca0f

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

test/AccountApiSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('Account API', () => {
1010
})
1111

1212
it('example', (done) => {
13-
if (api_key != "demo") {
13+
if (!process.env.API_KEY) {
1414
done()
1515
return
1616
}

test/SearchArchiveApiSpec.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,13 @@ const expect = require('expect');
22
const GSR = require('../lib/GoogleSearchResults');
33

44
describe('Search Archive API', () => {
5-
var api_key
6-
beforeEach(() => {
7-
// api_key is not required for the location API
8-
api_key = process.env.API_KEY || "demo"
9-
})
10-
115
it('example', (done) => {
12-
if (api_key != "demo") {
6+
if (!process.env.API_KEY) {
137
done()
148
return
159
}
1610

17-
var client = new GSR.GoogleSearchResults(api_key)
11+
var client = new GSR.GoogleSearchResults(process.env.API_KEY)
1812
client.json({q: "Coffee", location: "Portland" }, (search_result) => {
1913
// search in archive for the search just returned
2014
client.search_archive(search_result.search_metadata.id, (archived_search) => {

0 commit comments

Comments
 (0)