To replicate
npm install
export API_KEY=(key)
npm test
21 passing (1s)
1 failing
1) Location API
example:
Uncaught Error: expect(received).toEqual(expected) // deep equality
Expected: 200635
Received: 1026201
Location API
1) example
I actually experienced this when refactoring PHP so switched to nodejs to sanity check the expected number and I think the 'Austin' search here changed due to possible updates?
const expect = require('expect');
const serpapi = require('../lib/main');
describe('Location API', () => {
it('example', (done) => {
var search = new serpapi.GoogleSearch()
search.location("Austin", 3, (data) => {
//console.log(data)
expect(data[0].google_id).toEqual(200635)
expect(data.length).toEqual(3)
done()
})
})
})