From f8b8de2e677ddd4f308c86b6247633d0f3e881ab Mon Sep 17 00:00:00 2001 From: Ruslan Khafizov Date: Mon, 9 Sep 2024 15:10:32 +0800 Subject: [PATCH] Update Relevance TS test (#131) --- tests/unit/Relevance.spec.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/unit/Relevance.spec.ts b/tests/unit/Relevance.spec.ts index 9e7f109..4f994c2 100644 --- a/tests/unit/Relevance.spec.ts +++ b/tests/unit/Relevance.spec.ts @@ -1,31 +1,28 @@ import { evaluate } from '@ps/AnyAll.Relevance'; -import { Leaf, Marking } from '@ps/AnyAll.Types/index.js'; -import { Just } from '@ps/Data.Maybe'; +import { False, Leaf, Marking, True } from '@ps/AnyAll.Types/index.js'; import { singleton } from '@ps/Data.Map'; const keyString = 'key'; const keyLeaf = new Leaf('key'); -function makeRightMarking(mark : boolean) { - const defaultR = new Just(mark); - - return Marking(singleton(keyString)(defaultR)); +function makeMarking(mark: any) { + return Marking(singleton(keyString)(mark)); } describe('evaluate', () => { it('right key present in marking and True', () => { expect( - evaluate(makeRightMarking(true))(keyLeaf) + evaluate(makeMarking(True))(keyLeaf) ).toEqual( - new Just(true) + True ); }); it('right key present in marking and False', () => { expect( - evaluate(makeRightMarking(false))(keyLeaf) + evaluate(makeMarking(False))(keyLeaf) ).toEqual( - new Just(false) + False ); }); }); \ No newline at end of file