Skip to content

Commit

Permalink
Add javascript test.
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffano committed Mar 17, 2024
1 parent 9020ff5 commit 6044430
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/javascript/get.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const assert = require('assert');
const OpenapiIplocation = require('openapi_iplocation');
const api = new OpenapiIplocation.DefaultApi();

describe('iplocation get', function() {
describe('json format', function() {
it('should return a JSON payload', function(done) {
const ip = '8.8.8.8';
const opts = {
'format': 'json'
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
assert.fail();
} else {
console.log('Data: ' + data);
}
};
api.rootGet(ip, opts, callback);
});
});
});

0 comments on commit 6044430

Please sign in to comment.