From 24c48d6bebf3c87bcec10cb1c44e667d300a2590 Mon Sep 17 00:00:00 2001 From: Kikuo Emoto Date: Mon, 18 Sep 2023 11:39:33 +0900 Subject: [PATCH] fix(lib): unstable Timepicker spec - Fixes the issue that the spec for `Timepicker` fails depending on the host environment. Fixes the locale, and hour format so that test results do not depend on the locale of the host machine. --- src/components/timepicker/Timepicker.spec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/timepicker/Timepicker.spec.js b/src/components/timepicker/Timepicker.spec.js index 32f5bb744..36b6e3f50 100644 --- a/src/components/timepicker/Timepicker.spec.js +++ b/src/components/timepicker/Timepicker.spec.js @@ -6,6 +6,11 @@ let wrapper describe('BTimepicker', () => { beforeEach(() => { wrapper = shallowMount(BTimepicker, { + props: { + // fixes the locale, and hour format to avoid flaky tests + locale: 'en-US', + hourFormat: '24' + }, global: { stubs: { // these components must not be stubs