From 3a5fc91f9290f577844e2a3c0c6ee6c57ac75dd8 Mon Sep 17 00:00:00 2001 From: Evan Wallace Date: Thu, 22 Apr 2021 00:14:37 -0700 Subject: [PATCH] fix test262 tests --- internal/helpers/timer.go | 2 +- scripts/test262.js | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/internal/helpers/timer.go b/internal/helpers/timer.go index f426161b..8a628de4 100644 --- a/internal/helpers/timer.go +++ b/internal/helpers/timer.go @@ -91,7 +91,7 @@ func (t *Timer) Log(log logger.Log) { log.AddMsg(logger.Msg{ Kind: logger.Info, - Data: logger.MsgData{Text: "Timing information (times may not nest hierarchically up due to parallelism)"}, + Data: logger.MsgData{Text: "Timing information (times may not nest hierarchically due to parallelism)"}, Notes: notes, }) } diff --git a/scripts/test262.js b/scripts/test262.js index 293c2389..efe3866d 100644 --- a/scripts/test262.js +++ b/scripts/test262.js @@ -37,8 +37,7 @@ function formatErrors(content, error) { } async function main() { - const { startService } = installForTests(); - const service = await startService(); + const esbuild = installForTests(); const files = findFiles(); let runCount = 0; let shouldHavePassed = 0; @@ -49,8 +48,8 @@ async function main() { async function esbuildFile(input, options) { try { - const { js } = await service.transform(input, options); - return { success: true, output: js }; + const { code } = await esbuild.transform(input, options); + return { success: true, output: code }; } catch (error) { return { success: false, error }; } @@ -145,9 +144,6 @@ async function main() { console.log(`reparse failures: ${reparseCount}`); console.log(`reprint failures: ${reprintCount}`); console.log(`minify failures: ${minifyCount}`); - - // Clean up after all tests finish - service.stop(); } main().catch(e => setTimeout(() => {