summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/benchmark.py4
-rwxr-xr-xtools/fmt_test.py43
-rwxr-xr-xtools/lint.py4
3 files changed, 2 insertions, 49 deletions
diff --git a/tools/benchmark.py b/tools/benchmark.py
index 2a1310a39..a0e12fa48 100755
--- a/tools/benchmark.py
+++ b/tools/benchmark.py
@@ -29,10 +29,6 @@ exec_time_benchmarks = [
("workers_round_robin", ["tests/workers_round_robin_bench.ts"]),
("text_decoder", ["cli/tests/text_decoder_perf.js"]),
("text_encoder", ["cli/tests/text_encoder_perf.js"]),
- ("compile_local_prettier", ["fetch", "--reload", "std/prettier/main.ts"]),
- ("compile_remote_prettier",
- ["fetch", "--reload",
- "https://deno.land/x/std@v0.29.0/prettier/main.ts"]),
]
diff --git a/tools/fmt_test.py b/tools/fmt_test.py
deleted file mode 100755
index d05c3aea6..000000000
--- a/tools/fmt_test.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import os
-import shutil
-
-from test_util import DenoTestCase, run_tests
-from util import mkdtemp, root_path, tests_path, run_output
-
-
-class TestFmt(DenoTestCase):
- def test_fmt(self):
- d = mkdtemp()
- try:
- fixed_filename = os.path.join(tests_path,
- "badly_formatted_fixed.js")
- 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 the temp dir to 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
-
- result = run_output(
- [os.path.join(root_path, self.deno_exe), "fmt", dst],
- cwd=d,
- merge_env={"DENO_DIR": deno_dir},
- exit_on_fail=True,
- quiet=True)
- self.assertEqual(result.code, 0)
- with open(fixed_filename) as f:
- expected = f.read()
- with open(dst) as f:
- actual = f.read()
- self.assertEqual(expected, actual)
- finally:
- shutil.rmtree(d)
-
-
-if __name__ == "__main__":
- run_tests()
diff --git a/tools/lint.py b/tools/lint.py
index 8d2eaed1e..3ce4d7b02 100755
--- a/tools/lint.py
+++ b/tools/lint.py
@@ -22,8 +22,8 @@ def eslint():
"eslint")
# Find all *directories* in the main repo that contain .ts/.js files.
source_files = git_ls_files(root_path, [
- "*.js", "*.ts", ":!:std/prettier/vendor/*", ":!:std/**/testdata/*",
- ":!:std/**/node_modules/*", ":!:cli/compilers/*"
+ "*.js", "*.ts", ":!:std/**/testdata/*", ":!:std/**/node_modules/*",
+ ":!:cli/compilers/*"
])
source_dirs = set([os.path.dirname(f) for f in source_files])
# Within the source dirs, eslint does its own globbing, taking into account