From b22956bd998fd7bd523881b3fb4ea4555086e221 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 30 Apr 2018 11:05:39 +0100 Subject: [PATCH] Remove old locales test --- test/red/api/editor/locales_spec.js | 90 ++++++++++++++--------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/test/red/api/editor/locales_spec.js b/test/red/api/editor/locales_spec.js index d2ee32d4a..2c0469f67 100644 --- a/test/red/api/editor/locales_spec.js +++ b/test/red/api/editor/locales_spec.js @@ -71,49 +71,49 @@ describe("api/editor/locales", function() { }); }); - describe('get all node resource catalogs',function() { - var app; - before(function() { - // bit of a mess of internal workings - sinon.stub(i18n,'catalog',function(namespace, lang) { - return { - "node-red": "should not return", - "test-module-a-id": "test-module-a-catalog", - "test-module-b-id": "test-module-b-catalog", - "test-module-c-id": "test-module-c-catalog" - }[namespace] - }); - locales.init({ - nodes: { - getNodeList: function(opts) { - return Promise.resolve([ - {module:"node-red",id:"node-red-id"}, - {module:"test-module-a",id:"test-module-a-id"}, - {module:"test-module-b",id:"test-module-b-id"} - ]); - } - } - }); - app = express(); - app.get("/locales/nodes",locales.getAllNodes); - }); - after(function() { - i18n.catalog.restore(); - }) - it('returns with the node catalogs', function(done) { - request(app) - .get("/locales/nodes") - .expect(200) - .end(function(err,res) { - if (err) { - return done(err); - } - res.body.should.eql({ - 'test-module-a-id': 'test-module-a-catalog', - 'test-module-b-id': 'test-module-b-catalog' - }); - done(); - }); - }); - }); + // describe('get all node resource catalogs',function() { + // var app; + // before(function() { + // // bit of a mess of internal workings + // sinon.stub(i18n,'catalog',function(namespace, lang) { + // return { + // "node-red": "should not return", + // "test-module-a-id": "test-module-a-catalog", + // "test-module-b-id": "test-module-b-catalog", + // "test-module-c-id": "test-module-c-catalog" + // }[namespace] + // }); + // locales.init({ + // nodes: { + // getNodeList: function(opts) { + // return Promise.resolve([ + // {module:"node-red",id:"node-red-id"}, + // {module:"test-module-a",id:"test-module-a-id"}, + // {module:"test-module-b",id:"test-module-b-id"} + // ]); + // } + // } + // }); + // app = express(); + // app.get("/locales/nodes",locales.getAllNodes); + // }); + // after(function() { + // i18n.catalog.restore(); + // }) + // it('returns with the node catalogs', function(done) { + // request(app) + // .get("/locales/nodes") + // .expect(200) + // .end(function(err,res) { + // if (err) { + // return done(err); + // } + // res.body.should.eql({ + // 'test-module-a-id': 'test-module-a-catalog', + // 'test-module-b-id': 'test-module-b-catalog' + // }); + // done(); + // }); + // }); + // }); });