summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-08-08 15:22:18 +0200
committerGitHub <noreply@github.com>2024-08-08 13:22:18 +0000
commite9e3ab462863fdaf1c0639c53da16c737a0d913b (patch)
treef741df56548566f0842fa57d092195dec4f8ce0b /tests
parent0d1beed2e3633d71d5e288e0382b85be361ec13d (diff)
feat: deno clean (#24950)
Co-authored-by: Satya Rohith <me@satyarohith.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/specs/clean/general/__test__.jsonc37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/specs/clean/general/__test__.jsonc b/tests/specs/clean/general/__test__.jsonc
new file mode 100644
index 000000000..f425a20c1
--- /dev/null
+++ b/tests/specs/clean/general/__test__.jsonc
@@ -0,0 +1,37 @@
+{
+ "tempDir": true,
+ "envs": {
+ "DENO_DIR": "$PWD/deno_dir"
+ },
+ "steps": [{
+ // create deno dir
+ "args": "run http://localhost:4545/echo.ts hi",
+ "output": "[WILDCARD]"
+ }, {
+ "args": [
+ "eval",
+ "console.log(Deno.statSync('./deno_dir') != null)"
+ ],
+ "output": "true\n"
+ }, {
+ "args": "clean",
+ "output": "Removed [WILDLINE]/deno_dir\n"
+ }, {
+ "envs": {
+ // use a new dir to avoid creating the old one
+ "DENO_DIR": "$PWD/other"
+ },
+ "args": "clean",
+ "output": ""
+ }, {
+ "envs": {
+ // use a new dir to avoid creating the old one
+ "DENO_DIR": "$PWD/other"
+ },
+ "args": [
+ "eval",
+ "try { Deno.statSync('./deno_dir') } catch (_) { console.log(true) }"
+ ],
+ "output": "true\n"
+ }]
+}