From b3684636705737d38b942fecf2f006dc972e7253 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Fri, 25 Sep 2015 13:31:51 +0200 Subject: [PATCH] Use describe instead of suite --- .../cartodb/cache/model/named_maps_entry.test.js | 8 ++++---- test/unit/cartodb/req2params.test.js | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/unit/cartodb/cache/model/named_maps_entry.test.js b/test/unit/cartodb/cache/model/named_maps_entry.test.js index 6d1b21fb..abaef82f 100644 --- a/test/unit/cartodb/cache/model/named_maps_entry.test.js +++ b/test/unit/cartodb/cache/model/named_maps_entry.test.js @@ -4,25 +4,25 @@ var assert = require('assert'); var _ = require('underscore'); var NamedMapsCacheEntry = require('../../../../../lib/cartodb/cache/model/named_maps_entry'); -suite('cache named_maps_entry', function() { +describe('cache named_maps_entry', function() { var namedMapOwner = 'foo', namedMapName = 'wadus_name', namedMapsCacheEntry = new NamedMapsCacheEntry(namedMapOwner, namedMapName), entryKey = namedMapsCacheEntry.key(); - test('key is a string', function() { + it('key is a string', function() { assert.ok(_.isString(entryKey)); }); - test('key is 8 chars length', function() { + it('key is 8 chars length', function() { assert.equal(entryKey.length, 8); var entryKeyParts = entryKey.split(':'); assert.equal(entryKeyParts.length, 2); assert.equal(entryKeyParts[0], 'n'); }); - test('key is name spaced for named maps', function() { + it('key is name spaced for named maps', function() { var entryKeyParts = entryKey.split(':'); assert.equal(entryKeyParts.length, 2); assert.equal(entryKeyParts[0], 'n'); diff --git a/test/unit/cartodb/req2params.test.js b/test/unit/cartodb/req2params.test.js index 43f79ae0..9d53eb02 100644 --- a/test/unit/cartodb/req2params.test.js +++ b/test/unit/cartodb/req2params.test.js @@ -11,7 +11,7 @@ var TemplateMaps = require('../../../lib/cartodb/backends/template_maps'); var BaseController = require('../../../lib/cartodb/controllers/base'); var windshaft = require('windshaft'); -suite('req2params', function() { +describe('req2params', function() { var test_user = _.template(global.environment.postgres_auth_user, {user_id:1}); var test_pubuser = global.environment.postgres.user; @@ -31,7 +31,7 @@ suite('req2params', function() { }); - test('can be found in server_options', function(){ + it('can be found in server_options', function(){ assert.ok(_.isFunction(baseController.req2params)); }); @@ -43,7 +43,7 @@ suite('req2params', function() { return req; } - test('cleans up request', function(done){ + it('cleans up request', function(done){ var req = {headers: { host:'localhost' }, query: {dbuser:'hacker',dbname:'secret'}}; baseController.req2params(prepareRequest(req), function(err, req) { if ( err ) { done(err); return; } @@ -57,7 +57,7 @@ suite('req2params', function() { }); }); - test('sets dbname from redis metadata', function(done){ + it('sets dbname from redis metadata', function(done){ var req = {headers: { host:'localhost' }, query: {} }; baseController.req2params(prepareRequest(req), function(err, req) { if ( err ) { done(err); return; } @@ -71,7 +71,7 @@ suite('req2params', function() { }); }); - test('sets also dbuser for authenticated requests', function(done){ + it('sets also dbuser for authenticated requests', function(done){ var req = {headers: { host:'localhost' }, query: {map_key: '1234'} }; baseController.req2params(prepareRequest(req), function(err, req) { if ( err ) { done(err); return; } @@ -98,7 +98,7 @@ suite('req2params', function() { }); }); - test('it should extend params with decoded lzma', function(done) { + it('it should extend params with decoded lzma', function(done) { var qo = { config: { version: '1.3.0'