add tests for $digest