Enforce callback error handling

This commit is contained in:
Daniel García Aubert
2019-10-24 18:38:37 +02:00
parent d5406d5b50
commit d5218a86f6
26 changed files with 89 additions and 2 deletions
@@ -33,6 +33,7 @@ describe('turbo-carto-postgres-datasource', function () {
var buckets = 4;
var method = 'equal';
this.datasource.getRamp(column, buckets, method, function (err, result) {
assert.ifError(err);
var expected_result = {
ramp: [252, 501, 750, 999],
stats: { min_val: 3, max_val: 999, avg_val: 501 },
+4
View File
@@ -13,6 +13,10 @@ describe('lzma-middleware', function () {
}
};
testHelper.lzma_compress_to_base64(JSON.stringify(qo), 1, function (err, data) {
if (err) {
return done(err);
}
const lzma = lzmaMiddleware();
var req = {
headers: {
@@ -250,6 +250,7 @@ describe('dataviews-widgets-adapter', function () {
widgetsMapConfigs.forEach(function (mapConfig, index) {
it('should adapt widgets ' + index, function (done) {
dataviewsMapConfigAdapter.getMapConfig(user, mapConfig.input, params(), context(), function (err, result) {
assert.ifError(err);
assert.deepStrictEqual(result, mapConfig.expected);
done();
});