summaryrefslogtreecommitdiff
path: root/tests/019_media_types.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2018-10-22 13:14:27 +1100
committerRyan Dahl <ry@tinyclouds.org>2018-10-23 04:48:00 -0700
commit8ef7da261149ed03f25bdb5ea2611f8ce84a4d78 (patch)
tree8399dd030cf6fb172980d3b2c65bcf82d62b1168 /tests/019_media_types.ts
parentc0492ef061afd5af2044d5952432d223615841a7 (diff)
Enforce media types
Diffstat (limited to 'tests/019_media_types.ts')
-rw-r--r--tests/019_media_types.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/019_media_types.ts b/tests/019_media_types.ts
new file mode 100644
index 000000000..dbd951b3e
--- /dev/null
+++ b/tests/019_media_types.ts
@@ -0,0 +1,23 @@
+// 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.
+
+// tslint:disable:max-line-length
+import { loaded as loadedTs1 } from "http://localhost:4545/tests/subdir/mt_text_typescript.t1.ts";
+import { loaded as loadedTs2 } from "http://localhost:4545/tests/subdir/mt_video_vdn.t2.ts";
+import { loaded as loadedTs3 } from "http://localhost:4545/tests/subdir/mt_video_mp2t.t3.ts";
+import { loaded as loadedJs1 } from "http://localhost:4545/tests/subdir/mt_text_javascript.j1.js";
+import { loaded as loadedJs2 } from "http://localhost:4545/tests/subdir/mt_application_ecmascript.j2.js";
+import { loaded as loadedJs3 } from "http://localhost:4545/tests/subdir/mt_text_ecmascript.j3.js";
+import { loaded as loadedJs4 } from "http://localhost:4545/tests/subdir/mt_application_x_javascript.j4.js";
+
+console.log(
+ "success",
+ loadedTs1,
+ loadedTs2,
+ loadedTs3,
+ loadedJs1,
+ loadedJs2,
+ loadedJs3,
+ loadedJs4
+);