Skip to content

Commit

Permalink
Formatting test
Browse files Browse the repository at this point in the history
  • Loading branch information
CalvinRodo committed Jun 18, 2019
1 parent d66d6ff commit bf28ffa
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions tests/unit/i18n.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import en from "@/plugins/en.json";
import fr from "@/plugins/fr.json";
import _ from "lodash";
Expand All @@ -9,19 +8,19 @@ const frKeys = Object.keys(fr);
describe("i18n", () => {
it("should have identical keys", () => {
const val = _.difference(enKeys, frKeys);
const enIntersection = _.intersection(enKeys, val);
const mek = enIntersection.join("\n")
const frIntersection = _.intersection(frKeys, val);
const mfk = frIntersection.join("\n");

console.log(`
extra keys in en.json
${mek}
extra keys in fr.json
${mfk}`);

if (val.length > 0) {

const mek = _.intersection(enKeys, val)
.join("\n");

const mfk = _.intersection(frKeys, val)
.join("\n");

console.log(
`extra keys in en.json\n ${mek} extra keys in fr.json\n ${mfk}`
);
}

expect(Object.keys(val).length).toBe(0);
});


});

0 comments on commit bf28ffa

Please sign in to comment.