From e5aedb249fc7aef3a1d69d8acf953bfee402fe9e Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 30 Nov 2021 11:31:58 +0100 Subject: [PATCH] add basic test case for `t.append` method --- test/index.html | 1 + test/spec/core/localizer.js | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 test/spec/core/localizer.js diff --git a/test/index.html b/test/index.html index 3e079a2e1..c047ad690 100644 --- a/test/index.html +++ b/test/index.html @@ -82,6 +82,7 @@ 'spec/core/graph.js', 'spec/core/history.js', 'spec/core/locations.js', + 'spec/core/localizer.js', 'spec/core/tree.js', 'spec/core/validator.js', diff --git a/test/spec/core/localizer.js b/test/spec/core/localizer.js new file mode 100644 index 000000000..cf30d5ab7 --- /dev/null +++ b/test/spec/core/localizer.js @@ -0,0 +1,9 @@ +describe('iD.coreLocalizer', function() { + describe('#localized-text', function() { + it('appends localized text to the DOM', function() { + var selection = d3.select(document.createElement('div')); + selection.call(iD.localizer.t.append('icons.download' /* <- just any random string */)); + expect(selection.selectChild().classed('localized-text')).to.be.true; + }); + }); +});