Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

add fake timers to enable timestamp advancing #108

Merged
merged 1 commit into from
Nov 7, 2017
Merged

add fake timers to enable timestamp advancing #108

merged 1 commit into from
Nov 7, 2017

Conversation

nklincoln
Copy link
Contributor

Perishable network was failing tests because it was no longer possible to change the time of a transaction timestamp.

We can (should) use sinon.fakeTimers for that purpose

This PR adds sinon to devDeps, and uses a fake timer to artificially advance the timestamp of a transaction so we can test the contract violation correctly.

Signed-off-by: Nick Lincoln nkl199@yahoo.co.uk

Signed-off-by: Nick Lincoln <nkl199@yahoo.co.uk>
Copy link
Contributor

@davidkel davidkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool 👍

@nklincoln nklincoln merged commit ca5f1be into hyperledger-archives:master Nov 7, 2017
@nklincoln nklincoln deleted the fix-perishable branch March 23, 2018 12:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
2 participants