Closed lazka closed 3 years ago
Just specify a fixed clock for the parameter clock
in the services, e.g. here https://github.com/ehn-dcc-development/hcert-kotlin/blob/main/src/commonMain/kotlin/ehn/techiop/hcert/kotlin/valueset/ValueSetDecodeService.kt#L24
thanks. Any hints on how to do this via Javascript?
I've mocked the Date class for now..
It seem like all decoders (trust list, value,sets rules) check the parsed data against the current clock and fail if they are not longer valid. In combination with the official test data which is only valid for two days this makes it hard to integrate this into unit tests.
Is there any way to fake the current time for testing? (or to disable those checks for testing)