Commit 92e5968f by Aleksei Magusev

Fix ResponseParser for InfluxDB to return only string values

parent a101177b
...@@ -38,7 +38,7 @@ export default class ResponseParser { ...@@ -38,7 +38,7 @@ export default class ResponseParser {
}); });
return _.map(res, value => { return _.map(res, value => {
return { text: value }; return { text: value.toString() };
}); });
} }
} }
......
...@@ -105,9 +105,9 @@ describe('influxdb response parser', () => { ...@@ -105,9 +105,9 @@ describe('influxdb response parser', () => {
it('should return second column', () => { it('should return second column', () => {
expect(_.size(result)).toBe(3); expect(_.size(result)).toBe(3);
expect(result[0].text).toBe(0.0); expect(result[0].text).toBe('0');
expect(result[1].text).toBe(15.0); expect(result[1].text).toBe('15');
expect(result[2].text).toBe(20.2); expect(result[2].text).toBe('20.2');
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment