Skip to content

Commit

Permalink
test(NcDateTime): Works with different languages
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Apr 17, 2024
1 parent c32a06e commit 45a124a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/unit/components/NcDateTime/NcDateTime.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 language as it uses a different date format than English
*/
it('', () => {
const time = Date.UTC(2023, 5, 23, 14, 30)
Expand Down

0 comments on commit 45a124a

Please sign in to comment.