From 64d2b7bc90cf6fdba661d6d3fe243fe332c076ee Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 28 May 2019 16:33:32 -0400 Subject: Change tools/fmt_test.py to always download prettier This is to ensure a more fair test. Also we were already downloading from the internet since we changed the URL to use std@v0.5.0. This change exposes an OOM bug, which is then fixed in the upcoming compiler refactor by changing checkJs compiler option to false. --- tools/fmt_test.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tools/fmt_test.py') diff --git a/tools/fmt_test.py b/tools/fmt_test.py index 042dd8a64..a4fb072f9 100755 --- a/tools/fmt_test.py +++ b/tools/fmt_test.py @@ -16,9 +16,12 @@ def fmt_test(deno_exe): src = os.path.join(tests_path, "badly_formatted.js") dst = os.path.join(d, "badly_formatted.js") shutil.copyfile(src, dst) - # Set DENO_DIR to //js/ so we don't have to rely on an intenet - # connection to download https://deno.land/std/prettier/main.ts - deno_dir = os.path.join(root_path, "js") + # Set DENO_DIR to the temp dir so we test an initial fetch of prettier. + # TODO(ry) This make the test depend on internet access which is not + # ideal. We should have prettier in the repo already, and we could + # fetch it instead through tools/http_server.py. + deno_dir = d + # TODO(kt3k) The below line should be run([deno_exe, "fmt", dst], ...) # It should be updated when the below issue is addressed # https://github.com/denoland/deno_std/issues/330 -- cgit v1.2.3