feat: add jest configuration and sample unit test for utils module

This commit is contained in:
2025-11-23 22:46:02 +00:00
parent 8c5de5ee9d
commit 6bae549720
14 changed files with 954 additions and 93 deletions
+18
View File
@@ -251,6 +251,18 @@ run-oop-mutation: $(TARGET)
run-oop-advanced: $(TARGET)
$(TARGET) $(TEST_DIR)/oop_advanced.rc
run-unittest-math: $(TARGET)
$(TARGET) $(TEST_DIR)/test_math_unittest.rc
run-unittest-strings: $(TARGET)
$(TARGET) $(TEST_DIR)/test_strings_unittest.rc
run-unittest-oop: $(TARGET)
$(TARGET) $(TEST_DIR)/test_oop_unittest.rc
run-all-unittests: $(TARGET)
$(TARGET) $(TEST_DIR)/run_all_unittests.rc
run-http-simple: $(TARGET)
$(TARGET) $(EXAMPLE_DIR)/http_simple.rc
@@ -300,6 +312,12 @@ help:
@echo " make run-oop-mutation - Run oop_mutation_test.rc (field mutation)"
@echo " make run-oop-advanced - Run oop_advanced.rc (advanced OOP examples)"
@echo ""
@echo "Unittest Framework:"
@echo " make run-unittest-math - Run test_math_unittest.rc (math function tests)"
@echo " make run-unittest-strings - Run test_strings_unittest.rc (string function tests)"
@echo " make run-unittest-oop - Run test_oop_unittest.rc (OOP feature tests)"
@echo " make run-all-unittests - Run run_all_unittests.rc (all unittest suites)"
@echo ""
@echo "Examples:"
@echo " make run-http-simple - Run http_simple.rc (single connection HTTP server)"
@echo " make run-http-persistent - Run http_persistent.rc (persistent HTTP server)"