journal/tool/lib/journalLibTests.jq

24 lines
582 B
Plaintext
Raw Normal View History

2024-11-09 13:13:47 +00:00
include "dropins";
import "testLib" as testLib;
import "journalLib" as journalLib;
import "testdata/tests_export" as $exportDataArray;
def journalLibTests:
testLib::expectPassed(testLib::runTest(
"invalid input to experienceByTitle";
(
null | journalLib::experienceByTitle("Test")
);
. == "experienceByTitle takes a array of experiences as input";
true
)) |
testLib::expectPassed(testLib::runTest(
"experience not found";
(
$exportDataArray[0].experiences | journalLib::experienceByTitle("Test")
);
. == null;
false
));