33 lines
755 B
Plaintext
33 lines
755 B
Plaintext
include "dropins";
|
|
|
|
import "lib/testLib" as testLib;
|
|
import "lib/typeLib" as typeLib;
|
|
|
|
import "journalUtils" as journalUtils;
|
|
|
|
import "testdata/tests_export" as $exportDataArray;
|
|
|
|
def journalUtilsTests:
|
|
testLib::expectPassed(testLib::runTest(
|
|
"invalid input to experienceByTitle";
|
|
(
|
|
null | journalUtils::experienceByTitle("Test")
|
|
);
|
|
. == "experienceByTitle takes a array of experiences as input";
|
|
true
|
|
)) |
|
|
testLib::expectPassed(testLib::runTest(
|
|
"experience not found";
|
|
(
|
|
$exportDataArray[0].experiences | journalUtils::experienceByTitle("Test")
|
|
);
|
|
. == null;
|
|
false
|
|
));
|
|
|
|
def testsMain:
|
|
testLib::testTests |
|
|
typeLib::typeLibTests |
|
|
journalUtilsTests |
|
|
"Tests Passed\n" | halt_error(0);
|