Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Commit 78f1ce3

Browse files
committed
create cultural context entry in test
1 parent bd91424 commit 78f1ce3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/sensemaker_dna/sensemaker/neighbourhood.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,29 @@ export default () => {
889889
"maybe_input_dataset": null,
890890
}
891891
t.deepEqual(objectiveAssessment3, decode((readObjectiveAssessmentOutput3.entry as any).Present.entry) as any);
892+
893+
894+
892895
// create context and threshold
896+
const threshold = {
897+
"dimension_eh": createDimensionEntryHash,
898+
"kind": { "GreaterThan": null },
899+
"value": { "Integer": 5 },
900+
}
901+
const culturalContext = {
902+
"name": "more than 5 total likeness",
903+
"resource_type_eh": createResourceTypeEntryHash,
904+
"thresholds": [threshold],
905+
"order_by": [[createDimensionEntryHash, { "Biggest": null }]], // DimensionEh
906+
}
907+
908+
const createContextEntryHash: EntryHash = await callZomeAlice(
909+
"sensemaker",
910+
"create_cultural_context",
911+
culturalContext,
912+
true
913+
)
914+
t.ok(createContextEntryHash);
893915

894916
// create 3 objective assessments, 2 meet threshold and test ordering, 1 doesn't meet to test threshold
895917
// 2 likes, 1 like, 0 likes

0 commit comments

Comments
 (0)