Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. describe('Test', () => {
  2. const englishMessageBundle = {
  3. "KEY1": "VALUE1",
  4. "KEY2": "VALUE2",
  5. "KEY3": "VALUE3",
  6. };
  7.  
  8. const dutchMessageBundle = {
  9. "KEY1": "WAARDE1",
  10. // We forgot to add KEY 2, the test should notice this and fail.
  11. "KEY3": "WAARDE3",
  12. };
  13.  
  14. test('Verify if all keys in the english bundle also exist in the dutch bundle', () => {
  15. for (const [key] of Object.entries(englishMessageBundle)) {
  16. expect(Object.prototype.hasOwnProperty.call(dutchMessageBundle, key)).toBeTruthy();
  17. }
  18. });
  19. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement