Commit Graph

3 Commits

Author SHA1 Message Date
Vitalii
c5bca894fd web/satellite: fix linter
Added imports linting, trailing commas, trailing semicolons, single quotes and spaces between curly braces.

Change-Id: I5de5d3eea48753dfe2737983b230bafaffe898c8
2022-09-09 11:02:04 +00:00
Moby von Briesen
a8b1e1a81d web/satellite/jest.config: Always use UTC
Update jest config to use UTC so that undesired timestamp changes are
not made to snapshots when they are updated in American timezones.

Right now, if you are in an American timezone, there are diffs like this
in the snapshot files after updating them:

-  <p class="user-container__date">1/1/1970</p>
+  <p class="user-container__date">12/31/1969</p>

The hacky solution is to manually set timezone to Europe/Amsterdam in
the terminal before updating snapshots, but this commit should fix that
automatically.

Change-Id: I7cbbda0493b229fcd22b863dd688201436edc18a
2022-05-10 17:46:37 +00:00
Egon Elbre
8620532a05 web/satellite: bump dependencies
This contains also multiple fixes to make it work.
The following is a non-exhaustive list.

When @Prop default value is a callback, then it is called
instead of set verbatim. This means, when you want a default
value to be a callback, then it needs to be `default: () => () => X`.

jest does not yet properly support WebWorkers, hence the code introduces
an indirection to provide the worker URL.

This in turn required removing the global "store" dependency from
the tests. As a consequence the new NotificatorPlugin takes store
as a dependency. And many of the tests are adjusted to not import
store directly.

Moved StoreModule definition to avoid initializing the global store.

Some of the router code was moved into store. We can later figure out
how to structure it better and move it back.

bip39 needs explicit fallbacks for some of the dependencies.

Fixes to timer mocking. jest supports it natively.

Remove sinon dependency. jest provides all the functionality we need.

Change-Id: I7af3599390c63ce9f99dbd0b1e0870e9f8ca994d
2022-05-04 15:02:01 +00:00