Remove stripCommentsFromJson code and test

Since we dont allow comments in the json anymore anyway
This commit is contained in:
rejas
2020-07-09 20:30:26 +02:00
parent d570f910f8
commit dc089d7db9
2 changed files with 1 additions and 100 deletions

View File

@@ -171,25 +171,6 @@ describe("Translator", function () {
};
});
it("should strip comments", function (done) {
const dom = new JSDOM(`<script>var Log = {log: function(){}};</script><script src="${path.join(__dirname, "..", "..", "..", "js", "translator.js")}">`, { runScripts: "dangerously", resources: "usable" });
dom.window.onload = function () {
const { Translator } = dom.window;
const file = "StripComments.json";
Translator.load(mmm, file, false, function () {
expect(Translator.translations[mmm.name]).to.be.deep.equal({
'FOO"BAR': "Today",
N: "N",
E: "E",
S: "S",
W: "W"
});
done();
});
};
});
it("should not load translations, if module fallback exists", function (done) {
const dom = new JSDOM(`<script>var Log = {log: function(){}};</script><script src="${path.join(__dirname, "..", "..", "..", "js", "translator.js")}">`, { runScripts: "dangerously", resources: "usable" });
dom.window.onload = function () {