1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

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.
This commit is contained in:
Ryan Dahl 2019-05-28 16:33:32 -04:00
parent 53b6356ec5
commit 64d2b7bc90

View file

@ -16,9 +16,12 @@ def fmt_test(deno_exe):
src = os.path.join(tests_path, "badly_formatted.js") src = os.path.join(tests_path, "badly_formatted.js")
dst = os.path.join(d, "badly_formatted.js") dst = os.path.join(d, "badly_formatted.js")
shutil.copyfile(src, dst) shutil.copyfile(src, dst)
# Set DENO_DIR to //js/ so we don't have to rely on an intenet # Set DENO_DIR to the temp dir so we test an initial fetch of prettier.
# connection to download https://deno.land/std/prettier/main.ts # TODO(ry) This make the test depend on internet access which is not
deno_dir = os.path.join(root_path, "js") # 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], ...) # TODO(kt3k) The below line should be run([deno_exe, "fmt", dst], ...)
# It should be updated when the below issue is addressed # It should be updated when the below issue is addressed
# https://github.com/denoland/deno_std/issues/330 # https://github.com/denoland/deno_std/issues/330