Fix tests

This commit is contained in:
marked 2025-04-12 20:08:38 +02:00
parent 00e62105fc
commit 7646bd93b5
2 changed files with 19 additions and 14 deletions

View file

@ -27,9 +27,14 @@ local function sync(to: string): result.Identity<boolean>
fs.writeDir(to)
end
if not fs.metadata(`{to}/addons`).exists then
fs.writeDir(`{to}/addons`)
end
progress:nextStage() -- fetch
local includes = {
"addons/observers.luau",
"jecs.luau",
"README.md",
"CHANGELOG.md",

View file

@ -46,23 +46,23 @@ local function test(origin: string): result.Identity<boolean>
progress:nextStage() -- fetch
do
local contents = shared.fetch_raw("tools/testkit.luau")
local includes = {
"tools/testkit.luau",
"tools/runtime_lints.luau",
"tools/lifetime_tracker.luau",
"tools/entity_visualiser.luau",
"test/tests.luau",
}
for _, file in includes do
local contents = shared.fetch_raw(file)
if not contents.ok then
progress:stop()
stdio.ewrite(`🔥 Couldn't get the latest source for tools/testkit.luau:\n{contents.err}\n`)
return result(false, "Couldn't get the latest source for tools/testkit.luau.")
stdio.ewrite(`🔥 Couldn't get the latest source for {file}:\n{contents.err}\n`)
return result(false, `Couldn't get the latest source for {file}.`)
end
fs.writeFile(`{origin}/tools/testkit.luau`, contents.val)
end
do
local contents = shared.fetch_raw("test/tests.luau")
if not contents.ok then
progress:stop()
stdio.ewrite(`🔥 Couldn't get the latest source for test/tests.luau:\n{contents.err}\n`)
return result(false, "Couldn't get the latest source for test/tests.luau.")
end
fs.writeFile(`{origin}/test/tests.luau`, contents.val)
fs.writeFile(`{origin}/{file}`, contents.val)
end
progress:nextStage() -- test