mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 23:09:49 +02:00
test(gantt): test daylight savings in ganttdb
Add a quick test that ensures `ganttDb` correctly adds `1d` (1 day), even on days with 25 hours. This test only runs if the test PC has the TZ='America/Los_Angeles' set (California has daylight savings). I've added a test to the GitHub Actions `test.yml` action too for this. It should only add about 5 seconds to each test, so it isn't too bad.
This commit is contained in:
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@@ -33,6 +33,14 @@ jobs:
|
||||
run: |
|
||||
pnpm run ci --coverage
|
||||
|
||||
- name: Run ganttDb tests using California timezone
|
||||
env:
|
||||
# Makes sure that gantt db works even in a timezone that has daylight savings
|
||||
# since some days have 25 hours instead of 24.
|
||||
TZ: America/Los_Angeles
|
||||
run: |
|
||||
pnpm exec vitest run ./packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts
|
||||
|
||||
- name: Upload Coverage to Coveralls
|
||||
# it feels a bit weird to use @master, but that's what the docs use
|
||||
# (coveralls also doesn't publish a @v1 we can use)
|
||||
|
Reference in New Issue
Block a user