Skip to content

Commit

Permalink
Roll out digest language to the Hypothesis fetcher #3239
Browse files Browse the repository at this point in the history
  • Loading branch information
giorgiosironi committed May 15, 2024
1 parent e4f6ce4 commit 83e7378
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ${response.text}`,
),
);

const toReview = (logger: Logger) => (response: HypothesisAnnotation) => {
const toEvaluationDigest = (logger: Logger) => (response: HypothesisAnnotation) => {
const digest = pipe(
insertSelectedText(response),
(text) => converter.render(text),
Expand All @@ -51,5 +51,5 @@ export const fetchHypothesisAnnotation = (
decodeAndLogFailures(logger, hypothesisAnnotation, { key }),
E.mapLeft(() => DE.unavailable),
)),
TE.map(toReview(logger)),
TE.map(toEvaluationDigest(logger)),
);
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const date = '2019-09-12T09:55:46.146050+00:00';
const key = arbitraryWord();

describe('fetch-hypothesis-annotation', () => {
it('returns the evaluation', async () => {
it('returns the full text as the evaluation digest', async () => {
const queryExternalService = () => () => TE.right({
created: date,
text: '<p>Very good</p>',
Expand Down

0 comments on commit 83e7378

Please sign in to comment.