rm top level fns

This commit is contained in:
2026-01-15 17:56:33 -06:00
parent 5018901acb
commit ac91495679
30 changed files with 340 additions and 451 deletions

10
test.ce
View File

@@ -336,14 +336,14 @@ function run_tests(package_name, specific_test) {
log.console(` FAIL ${t.name} ${test_entry.error.message}`)
if (test_entry.error.stack) {
log.console(` ${test_entry.error.stack.split('\n').join('\n ')}`)
log.console(` ${text(test_entry.error.stack.split('\n'), '\n ')}`)
}
pkg_result.failed++
file_result.failed++
}
var end_time = time.number()
test_entry.duration_ns = number.round((end_time - start_time) * 1000000000)
test_entry.duration_ns = round((end_time - start_time) * 1000000000)
file_result.tests.push(test_entry)
pkg_result.total++
@@ -415,7 +415,7 @@ function handle_actor_message(msg) {
pending_actor_tests.splice(found_idx, 1)
var end_time = time.number()
var duration_ns = number.round((end_time - base_entry.start_time) * 1000000000)
var duration_ns = round((end_time - base_entry.start_time) * 1000000000)
var results = []
if (is_array(msg)) {
@@ -567,7 +567,7 @@ if (all_actor_tests.length == 0) {
// Generate Reports function
function generate_reports(totals) {
var timestamp = text(number.floor(time.number()))
var timestamp = text(floor(time.number()))
var report_dir = shop.get_reports_dir() + '/test_' + timestamp
ensure_dir(report_dir)
@@ -602,7 +602,7 @@ Total: ${totals.total}, Passed: ${totals.passed}, Failed: ${totals.failed}
if (t.error) {
txt_report += ` Message: ${t.error.message}\n`
if (t.error.stack) {
txt_report += ` Stack:\n${t.error.stack.split('\n').map(function(l){return ` ${l}`}).join('\n')}\n`
txt_report += ` Stack:\n${text(t.error.stack.split('\n').map(function(l){return ` ${l}`}), '\n')}\n`
}
}
txt_report += `\n`