Skip to content

Instantly share code, notes, and snippets.

@kevinvaldek
Created September 23, 2017 14:19
Show Gist options
  • Save kevinvaldek/eb8368d7f6a78249402ab1665bdfbbeb to your computer and use it in GitHub Desktop.
Save kevinvaldek/eb8368d7f6a78249402ab1665bdfbbeb to your computer and use it in GitHub Desktop.
HMKit Node.js vehicle location example
describe(`VehicleLocationCommand`, () => {
it(`should get vehicle location`, async () => {
const response = await hmkit.telematics.sendCommand(
vehicleSerial,
hmkit.commands.VehicleLocationCommand.get()
);
expect(response.parse()).toEqual(
expect.objectContaining({
latitude: expect.any(Number),
longitude: expect.any(Number),
})
);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment