2024-11-07 21:45:22 +00:00
|
|
|
include "dropins";
|
|
|
|
|
|
|
|
import "lib/testLib" as testLib;
|
|
|
|
import "lib/typeLib" as typeLib;
|
2024-11-09 00:57:22 +00:00
|
|
|
import "lib/journalLib" as journalLib;
|
2024-11-07 21:45:22 +00:00
|
|
|
|
|
|
|
import "journalUtils" as journalUtils;
|
|
|
|
|
|
|
|
import "testdata/tests_export" as $exportDataArray;
|
2024-11-07 08:58:38 +00:00
|
|
|
|
2024-11-07 11:39:39 +00:00
|
|
|
def journalUtilsTests:
|
2024-11-07 21:45:22 +00:00
|
|
|
testLib::expectPassed(testLib::runTest(
|
2024-11-07 08:58:38 +00:00
|
|
|
"invalid input to experienceByTitle";
|
|
|
|
(
|
2024-11-09 00:57:22 +00:00
|
|
|
null | journalLib::experienceByTitle("Test")
|
2024-11-07 08:58:38 +00:00
|
|
|
);
|
2024-11-07 09:10:34 +00:00
|
|
|
. == "experienceByTitle takes a array of experiences as input";
|
|
|
|
true
|
2024-11-07 13:10:18 +00:00
|
|
|
)) |
|
2024-11-07 21:45:22 +00:00
|
|
|
testLib::expectPassed(testLib::runTest(
|
2024-11-07 13:10:18 +00:00
|
|
|
"experience not found";
|
|
|
|
(
|
2024-11-09 00:57:22 +00:00
|
|
|
$exportDataArray[0].experiences | journalLib::experienceByTitle("Test")
|
2024-11-07 13:10:18 +00:00
|
|
|
);
|
|
|
|
. == null;
|
|
|
|
false
|
2024-11-07 11:39:39 +00:00
|
|
|
));
|
|
|
|
|
|
|
|
def testsMain:
|
2024-11-07 21:45:22 +00:00
|
|
|
testLib::testTests |
|
2024-11-07 11:39:39 +00:00
|
|
|
typeLib::typeLibTests |
|
2024-11-07 21:45:22 +00:00
|
|
|
journalUtilsTests |
|
2024-11-07 11:39:39 +00:00
|
|
|
"Tests Passed\n" | halt_error(0);
|