summaryrefslogtreecommitdiff
path: root/cli/js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js')
-rw-r--r--cli/js/body_test.ts4
-rw-r--r--cli/js/compiler_util.ts2
-rw-r--r--cli/js/fetch_test.ts10
-rw-r--r--cli/js/files_test.ts16
-rw-r--r--cli/js/read_dir_test.ts6
-rw-r--r--cli/js/resources_test.ts2
-rw-r--r--cli/js/stat_test.ts4
7 files changed, 22 insertions, 22 deletions
diff --git a/cli/js/body_test.ts b/cli/js/body_test.ts
index bb4d0a451..2ac4d1314 100644
--- a/cli/js/body_test.ts
+++ b/cli/js/body_test.ts
@@ -34,7 +34,7 @@ test(async function arrayBufferFromByteArrays(): Promise<void> {
//FormData
testPerm({ net: true }, async function bodyMultipartFormData(): Promise<void> {
const response = await fetch(
- "http://localhost:4545/tests/subdir/multipart_form_data.txt"
+ "http://localhost:4545/cli/tests/subdir/multipart_form_data.txt"
);
const text = await response.text();
@@ -51,7 +51,7 @@ testPerm({ net: true }, async function bodyMultipartFormData(): Promise<void> {
testPerm({ net: true }, async function bodyURLEncodedFormData(): Promise<void> {
const response = await fetch(
- "http://localhost:4545/tests/subdir/form_urlencoded.txt"
+ "http://localhost:4545/cli/tests/subdir/form_urlencoded.txt"
);
const text = await response.text();
diff --git a/cli/js/compiler_util.ts b/cli/js/compiler_util.ts
index f541ea46f..b58d8da43 100644
--- a/cli/js/compiler_util.ts
+++ b/cli/js/compiler_util.ts
@@ -293,7 +293,7 @@ export const ignoredDiagnostics = [
// TS5009: Cannot find the common subdirectory path for the input files.
5009,
// TS5055: Cannot write file
- // 'http://localhost:4545/tests/subdir/mt_application_x_javascript.j4.js'
+ // 'http://localhost:4545/cli/tests/subdir/mt_application_x_javascript.j4.js'
// because it would overwrite input file.
5055,
// TypeScript is overly opinionated that only CommonJS modules kinds can
diff --git a/cli/js/fetch_test.ts b/cli/js/fetch_test.ts
index 92d1176cc..b8a7c8641 100644
--- a/cli/js/fetch_test.ts
+++ b/cli/js/fetch_test.ts
@@ -114,7 +114,7 @@ testPerm({ net: true }, async function fetchMultipartFormDataSuccess(): Promise<
void
> {
const response = await fetch(
- "http://localhost:4545/tests/subdir/multipart_form_data.txt"
+ "http://localhost:4545/cli/tests/subdir/multipart_form_data.txt"
);
const formData = await response.formData();
assert(formData.has("field_1"));
@@ -131,7 +131,7 @@ testPerm(
{ net: true },
async function fetchURLEncodedFormDataSuccess(): Promise<void> {
const response = await fetch(
- "http://localhost:4545/tests/subdir/form_urlencoded.txt"
+ "http://localhost:4545/cli/tests/subdir/form_urlencoded.txt"
);
const formData = await response.formData();
assert(formData.has("field_1"));
@@ -153,11 +153,11 @@ testPerm({ net: true }, async function fetchWithRedirection(): Promise<void> {
testPerm({ net: true }, async function fetchWithRelativeRedirection(): Promise<
void
> {
- const response = await fetch("http://localhost:4545/tests"); // will redirect to /tests/
+ const response = await fetch("http://localhost:4545/cli/tests"); // will redirect to /cli/tests/
assertEquals(response.status, 200);
assertEquals(response.statusText, "OK");
const body = await response.text();
- assert(body.includes("<title>Directory listing for /tests/</title>"));
+ assert(body.includes("<title>Directory listing for /cli/tests/</title>"));
});
// The feature below is not implemented, but the test should work after implementation
@@ -165,7 +165,7 @@ testPerm({ net: true }, async function fetchWithRelativeRedirection(): Promise<
testPerm({ net: true }, async function fetchWithInfRedirection(): Promise<
void
> {
- const response = await fetch("http://localhost:4549/tests"); // will redirect to the same place
+ const response = await fetch("http://localhost:4549/cli/tests"); // will redirect to the same place
assertEquals(response.status, 0); // network error
});
*/
diff --git a/cli/js/files_test.ts b/cli/js/files_test.ts
index fca9a3859..8f4beb085 100644
--- a/cli/js/files_test.ts
+++ b/cli/js/files_test.ts
@@ -24,7 +24,7 @@ testPerm({ read: true }, async function filesCopyToStdout(): Promise<void> {
});
testPerm({ read: true }, async function filesToAsyncIterator(): Promise<void> {
- const filename = "tests/hello.txt";
+ const filename = "cli/tests/hello.txt";
const file = await Deno.open(filename);
let totalSize = 0;
@@ -297,7 +297,7 @@ testPerm(
);
testPerm({ read: true }, async function seekStart(): Promise<void> {
- const filename = "tests/hello.txt";
+ const filename = "cli/tests/hello.txt";
const file = await Deno.open(filename);
// Deliberately move 1 step forward
await file.read(new Uint8Array(1)); // "H"
@@ -310,7 +310,7 @@ testPerm({ read: true }, async function seekStart(): Promise<void> {
});
testPerm({ read: true }, function seekSyncStart(): void {
- const filename = "tests/hello.txt";
+ const filename = "cli/tests/hello.txt";
const file = Deno.openSync(filename);
// Deliberately move 1 step forward
file.readSync(new Uint8Array(1)); // "H"
@@ -323,7 +323,7 @@ testPerm({ read: true }, function seekSyncStart(): void {
});
testPerm({ read: true }, async function seekCurrent(): Promise<void> {
- const filename = "tests/hello.txt";
+ const filename = "cli/tests/hello.txt";
const file = await Deno.open(filename);
// Deliberately move 1 step forward
await file.read(new Uint8Array(1)); // "H"
@@ -336,7 +336,7 @@ testPerm({ read: true }, async function seekCurrent(): Promise<void> {
});
testPerm({ read: true }, function seekSyncCurrent(): void {
- const filename = "tests/hello.txt";
+ const filename = "cli/tests/hello.txt";
const file = Deno.openSync(filename);
// Deliberately move 1 step forward
file.readSync(new Uint8Array(1)); // "H"
@@ -349,7 +349,7 @@ testPerm({ read: true }, function seekSyncCurrent(): void {
});
testPerm({ read: true }, async function seekEnd(): Promise<void> {
- const filename = "tests/hello.txt";
+ const filename = "cli/tests/hello.txt";
const file = await Deno.open(filename);
await file.seek(-6, Deno.SeekMode.SEEK_END);
const buf = new Uint8Array(6);
@@ -359,7 +359,7 @@ testPerm({ read: true }, async function seekEnd(): Promise<void> {
});
testPerm({ read: true }, function seekSyncEnd(): void {
- const filename = "tests/hello.txt";
+ const filename = "cli/tests/hello.txt";
const file = Deno.openSync(filename);
file.seekSync(-6, Deno.SeekMode.SEEK_END);
const buf = new Uint8Array(6);
@@ -369,7 +369,7 @@ testPerm({ read: true }, function seekSyncEnd(): void {
});
testPerm({ read: true }, async function seekMode(): Promise<void> {
- const filename = "tests/hello.txt";
+ const filename = "cli/tests/hello.txt";
const file = await Deno.open(filename);
let err;
try {
diff --git a/cli/js/read_dir_test.ts b/cli/js/read_dir_test.ts
index 8cc66caee..77d2cbfe2 100644
--- a/cli/js/read_dir_test.ts
+++ b/cli/js/read_dir_test.ts
@@ -13,7 +13,7 @@ function assertSameContent(files: FileInfo[]): void {
}
if (file.name === "002_hello.ts") {
- assertEquals(file.mode!, Deno.statSync(`tests/${file.name}`).mode!);
+ assertEquals(file.mode!, Deno.statSync(`cli/tests/${file.name}`).mode!);
counter++;
}
}
@@ -22,7 +22,7 @@ function assertSameContent(files: FileInfo[]): void {
}
testPerm({ read: true }, function readDirSyncSuccess(): void {
- const files = Deno.readDirSync("tests/");
+ const files = Deno.readDirSync("cli/tests/");
assertSameContent(files);
});
@@ -67,7 +67,7 @@ testPerm({ read: true }, function readDirSyncNotFound(): void {
});
testPerm({ read: true }, async function readDirSuccess(): Promise<void> {
- const files = await Deno.readDir("tests/");
+ const files = await Deno.readDir("cli/tests/");
assertSameContent(files);
});
diff --git a/cli/js/resources_test.ts b/cli/js/resources_test.ts
index 880727027..367b66217 100644
--- a/cli/js/resources_test.ts
+++ b/cli/js/resources_test.ts
@@ -31,7 +31,7 @@ testPerm({ net: true }, async function resourcesNet(): Promise<void> {
testPerm({ read: true }, async function resourcesFile(): Promise<void> {
const resourcesBefore = Deno.resources();
- await Deno.open("tests/hello.txt");
+ await Deno.open("cli/tests/hello.txt");
const resourcesAfter = Deno.resources();
// check that exactly one new resource (file) was added
diff --git a/cli/js/stat_test.ts b/cli/js/stat_test.ts
index 7b4f06114..9b03c0ece 100644
--- a/cli/js/stat_test.ts
+++ b/cli/js/stat_test.ts
@@ -12,7 +12,7 @@ testPerm({ read: true }, async function statSyncSuccess(): Promise<void> {
assert(modulesInfo.isDirectory());
assert(!modulesInfo.isSymlink());
- const testsInfo = Deno.statSync("tests");
+ const testsInfo = Deno.statSync("cli/tests");
assert(testsInfo.isDirectory());
assert(!testsInfo.isSymlink());
});
@@ -96,7 +96,7 @@ testPerm({ read: true }, async function statSuccess(): Promise<void> {
assert(modulesInfo.isDirectory());
assert(!modulesInfo.isSymlink());
- const i = await Deno.stat("tests");
+ const i = await Deno.stat("cli/tests");
assert(i.isDirectory());
assert(!i.isSymlink());
});