Page MenuHomePhabricator

npm tests now run in UTC timezone
AbandonedPublic

Authored by darn-it-dan on Jan 7 2022, 04:53.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Summary

Allowing npm tests to run in UTC timezone.
This is needed because we have a jest test that checks a DateTime formatter function.
However it formats the date time to the local machines timezone, which causes the test to fail.
This change fixes that failing test no matter which time zone the tests are run.

Test Plan

Change your machines to different time zones and run the npm tests.

bash
cd bitcoin-abc/web/cashtab
npm i
npm test
# all tests should pass!

Diff Detail

Repository
rABC Bitcoin ABC
Branch
fix-npm-tests
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17816
Build 35458: Build Diffcashtab-tests
Build 35457: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Jan 7 2022, 04:53
bytesofman requested changes to this revision.Jan 7 2022, 16:46
bytesofman added a subscriber: bytesofman.
bytesofman added inline comments.
web/cashtab/package.json
48

Instead of editing package.json, please include this env variable in web/cashtab/scripts/test.js

This revision now requires changes to proceed.Jan 7 2022, 16:46

changed time env declaration to scripts/test.js

npm tests now run in UTC timezone

bytesofman added inline comments.
web/cashtab/scripts/test.js
6 ↗(On Diff #31706)

Why is this variable removed?

This revision now requires changes to proceed.Jan 10 2022, 22:53