From 8009bbb82fbaa64bf8419d20f479d064c0d26eb2 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Wed, 17 Apr 2024 10:58:35 -0700 Subject: [PATCH] test(NcDateTime): Works with different languages Signed-off-by: Christopher Ng --- tests/unit/components/NcDateTime/NcDateTime.spec.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/unit/components/NcDateTime/NcDateTime.spec.js b/tests/unit/components/NcDateTime/NcDateTime.spec.js index 0cd58f1200..5f02ef9982 100644 --- a/tests/unit/components/NcDateTime/NcDateTime.spec.js +++ b/tests/unit/components/NcDateTime/NcDateTime.spec.js @@ -71,18 +71,18 @@ describe('NcDateTime.vue', () => { expect(wrapper.element.textContent).toMatch(wrapper.element.getAttribute('title')) }) - describe('Work with different locales', () => { + describe('Work with different languages', () => { beforeAll(() => { - // mock the locale - document.documentElement.dataset.locale = 'de_DE' + // mock the language + document.documentElement.lang = 'de' }) afterAll(() => { // revert mock - document.documentElement.dataset.locale = 'en' + document.documentElement.lang = 'en' }) /** - * Use German locale as it uses a different date format than English + * Use German as it uses a different date format than English */ it('', () => { const time = Date.UTC(2023, 5, 23, 14, 30)