summaryrefslogtreecommitdiff
path: root/tests/specs/run/_035_cached_only_flag
diff options
context:
space:
mode:
authorMohammad Sulaiman <mohammad.sulaiman@exalt.ps>2024-11-05 08:39:05 +0200
committerGitHub <noreply@github.com>2024-11-05 06:39:05 +0000
commit89f0b796bd442ff352c3f93f69156ca6d85bfd5e (patch)
tree3ac2a58c6d85f6af57eb2c6b07b1f2d0e8687b3a /tests/specs/run/_035_cached_only_flag
parentf9a05068d6de247574fb764044a446d1d7ed2e9b (diff)
chore: deprecate run itests (#26444)
Diffstat (limited to 'tests/specs/run/_035_cached_only_flag')
-rw-r--r--tests/specs/run/_035_cached_only_flag/019_media_types.ts24
-rw-r--r--tests/specs/run/_035_cached_only_flag/035_cached_only_flag.out1
-rw-r--r--tests/specs/run/_035_cached_only_flag/__test__.jsonc5
3 files changed, 30 insertions, 0 deletions
diff --git a/tests/specs/run/_035_cached_only_flag/019_media_types.ts b/tests/specs/run/_035_cached_only_flag/019_media_types.ts
new file mode 100644
index 000000000..d985bd249
--- /dev/null
+++ b/tests/specs/run/_035_cached_only_flag/019_media_types.ts
@@ -0,0 +1,24 @@
+// When run against the test HTTP server, it will serve different media types
+// based on the URL containing `.t#.` strings, which exercises the different
+// mapping of media types end to end.
+
+import { loaded as loadedTs1 } from "http://localhost:4545/subdir/mt_text_typescript.t1.ts";
+import { loaded as loadedTs2 } from "http://localhost:4545/subdir/mt_video_vdn.t2.ts";
+import { loaded as loadedTs3 } from "http://localhost:4545/subdir/mt_video_mp2t.t3.ts";
+import { loaded as loadedTs4 } from "http://localhost:4545/subdir/mt_application_x_typescript.t4.ts";
+import { loaded as loadedJs1 } from "http://localhost:4545/subdir/mt_text_javascript.j1.js";
+import { loaded as loadedJs2 } from "http://localhost:4545/subdir/mt_application_ecmascript.j2.js";
+import { loaded as loadedJs3 } from "http://localhost:4545/subdir/mt_text_ecmascript.j3.js";
+import { loaded as loadedJs4 } from "http://localhost:4545/subdir/mt_application_x_javascript.j4.js";
+
+console.log(
+ "success",
+ loadedTs1,
+ loadedTs2,
+ loadedTs3,
+ loadedTs4,
+ loadedJs1,
+ loadedJs2,
+ loadedJs3,
+ loadedJs4,
+);
diff --git a/tests/specs/run/_035_cached_only_flag/035_cached_only_flag.out b/tests/specs/run/_035_cached_only_flag/035_cached_only_flag.out
new file mode 100644
index 000000000..aad3f2fbc
--- /dev/null
+++ b/tests/specs/run/_035_cached_only_flag/035_cached_only_flag.out
@@ -0,0 +1 @@
+error: Specifier not found in cache: "http://127.0.0.1:4545/019_media_types.ts", --cached-only is specified.
diff --git a/tests/specs/run/_035_cached_only_flag/__test__.jsonc b/tests/specs/run/_035_cached_only_flag/__test__.jsonc
new file mode 100644
index 000000000..ac9d01cdd
--- /dev/null
+++ b/tests/specs/run/_035_cached_only_flag/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --reload --check --allow-import --cached-only http://127.0.0.1:4545/019_media_types.ts",
+ "output": "035_cached_only_flag.out",
+ "exitCode": 1
+}