Timing of test using dayjs/moment #14208
Unanswered
geekiam23
asked this question in
Component Testing
Replies: 1 comment 1 reply
-
Have you looked into using |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Refers to running in the CI/CD
In our test suite, we have tests that start a service at a certain time with moment/dayjs. Running into a problem with the timing and looking to make it more reliable. If a test fails or if the computer does not perform correctly, it causes the test to fail. One problem that I notice is that moment/dayjs sets the time when you give the command instead of when it gets to each file (I know that's how JS functions).
Ex: Test 1 has a time of 2 mins from current time. Test 6 has a time of 7 mins from current time.
Let me know if this make sense or not. Would love to give more details.
I have one idea but do not know if it is best practice:
Instead of running the entire test suite, I can stagger the timing on each test file and only have to worry about the timing conflict of each file instead of the entire suite.
Beta Was this translation helpful? Give feedback.
All reactions