Skip to content

Commit 57fa911

Browse files
annieetangVighnesh-V
authored andcommitted
report failed test when test file fails to load; luacase to fix type errors in runner
1 parent da5f55b commit 57fa911

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lute/cli/commands/test/init.luau

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ local function loadtests(testfiles: { path.path })
6262
local success, err = pcall(luau.loadbypath, p, fenv)
6363

6464
if not success then
65-
print(`Error loading {path.format(p)}: {err}`)
65+
error(`Failed to load test file {path.format(p)}: {err}`)
6666
end
6767
end
6868
end

lute/std/libs/test/runner.luau

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ local asserts = require("./assert")
66
local types = require("./types")
77
local path = require("@std/path")
88

9-
type Test = types.Test
10-
type TestCase = types.TestCase
11-
type TestSuite = types.TestSuite
12-
type TestEnvironment = types.TestEnvironment
13-
type TestReporter = types.TestReporter
14-
type FailedTest = types.FailedTest
15-
type TestRunResult = types.TestRunResult
9+
type Test = types.test
10+
type TestCase = types.testcase
11+
type TestSuite = types.testsuite
12+
type TestEnvironment = types.testenvironment
13+
type TestReporter = types.testreporter
14+
type FailedTest = types.failedtest
15+
type TestRunResult = types.testrunresult
1616

1717
local runner = {}
1818

0 commit comments

Comments
 (0)