Skip to content

Commit

Permalink
update paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mmastrac committed Feb 6, 2024
1 parent 20ed1ff commit 0d69bbb
Show file tree
Hide file tree
Showing 121 changed files with 170 additions and 170 deletions.
2 changes: 1 addition & 1 deletion tests/integration/compile_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn compile_basic() {
"compile",
"--output",
&exe.to_string_lossy(),
"../../../cli/tests/testdata/welcome.ts",
"../../../tests/testdata/welcome.ts",
])
.run();
output.assert_exit_code(0);
Expand Down
6 changes: 3 additions & 3 deletions tests/node_compat/common.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { partition } from "../../../test_util/std/collections/partition.ts";
import { join } from "../../../test_util/std/path/mod.ts";
import * as JSONC from "../../../test_util/std/jsonc/mod.ts";
import { partition } from "../../test_util/std/collections/partition.ts";
import { join } from "../../test_util/std/path/mod.ts";
import * as JSONC from "../../test_util/std/jsonc/mod.ts";
/**
* The test suite matches the folders inside the `test` folder inside the
* node repo
Expand Down
2 changes: 1 addition & 1 deletion tests/node_compat/runner.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import "./polyfill_globals.js";
import { createRequire } from "node:module";
import { toFileUrl } from "../../../test_util/std/path/mod.ts";
import { toFileUrl } from "../../test_util/std/path/mod.ts";
const file = Deno.args[0];
if (!file) {
throw new Error("No file provided");
Expand Down
8 changes: 4 additions & 4 deletions tests/node_compat/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* all share the same working directory.
*/

import { magenta } from "../../../test_util/std/fmt/colors.ts";
import { pooledMap } from "../../../test_util/std/async/pool.ts";
import { dirname, fromFileUrl, join } from "../../../test_util/std/path/mod.ts";
import { fail } from "../../../test_util/std/assert/mod.ts";
import { magenta } from "../../test_util/std/fmt/colors.ts";
import { pooledMap } from "../../test_util/std/async/pool.ts";
import { dirname, fromFileUrl, join } from "../../test_util/std/path/mod.ts";
import { fail } from "../../test_util/std/assert/mod.ts";
import {
config,
getPathsFromTestSuites,
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/bench/allow_all.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "../../../../test_util/std/assert/mod.ts";
import { assertEquals } from "../../../test_util/std/assert/mod.ts";

const permissions: Deno.PermissionName[] = [
"read",
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/bench/allow_none.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { unreachable } from "../../../../test_util/std/assert/mod.ts";
import { unreachable } from "../../../test_util/std/assert/mod.ts";

const permissions: Deno.PermissionName[] = [
"read",
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/cat.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { copy } from "../../../test_util/std/streams/copy.ts";
import { copy } from "../../test_util/std/streams/copy.ts";
async function main() {
for (let i = 1; i < Deno.args.length; i++) {
const filename = Deno.args[i];
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/cert/listen_tls_alpn_fail.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertRejects } from "../../../../test_util/std/assert/mod.ts";
import { assertRejects } from "../../../test_util/std/assert/mod.ts";

const listener = Deno.listenTls({
port: Number(Deno.args[0]),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { join } from "../../../../../test_util/std/path/mod.ts";
import { join } from "../../../../test_util/std/path/mod.ts";

console.log("Starting the main module");

Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/compile/standalone_follow_redirects_2.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
import {
assertNotEquals as _a,
assertStrictEquals as _b,
} from "../../../../test_util/std/assert/mod.ts";
} from "../../../test_util/std/assert/mod.ts";
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertSnapshot } from "../../../../../test_util/std/testing/snapshot.ts";
import { assertSnapshot } from "../../../../test_util/std/testing/snapshot.ts";
import { truth } from "./no_snaps_included.ts";

Deno.test("the truth", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/coverage/no_tests_included/foo.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addNumbers } from "./foo.ts";
import { assertEquals } from "../../../../../test_util/std/assert/mod.ts";
import { assertEquals } from "../../../../test_util/std/assert/mod.ts";

Deno.test("addNumbers works", () => {
assertEquals(addNumbers(1, 2), 3);
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/coverage/no_tests_included/foo.test.mts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addNumbers } from "./foo.ts";
import { assertEquals } from "../../../../../test_util/std/assert/mod.ts";
import { assertEquals } from "../../../../test_util/std/assert/mod.ts";

Deno.test("addNumbers works", () => {
assertEquals(addNumbers(1, 2), 3);
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/coverage/no_tests_included/foo.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addNumbers } from "./foo.ts";
import { assertEquals } from "../../../../../test_util/std/assert/mod.ts";
import { assertEquals } from "../../../../test_util/std/assert/mod.ts";

Deno.test("addNumbers works", () => {
assertEquals(addNumbers(1, 2), 3);
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/coverage/no_transpiled_lines/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { assertStrictEquals } from "../../../../../test_util/std/assert/mod.ts";
export { assertStrictEquals } from "../../../../test_util/std/assert/mod.ts";

export * from "./interface.ts";
2 changes: 1 addition & 1 deletion tests/testdata/echo_server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { copy } from "../../../test_util/std/streams/copy.ts";
import { copy } from "../../test_util/std/streams/copy.ts";
const addr = Deno.args[0] || "0.0.0.0:4544";
const [hostname, port] = addr.split(":");
const listener = Deno.listen({ hostname, port: Number(port) });
Expand Down
4 changes: 2 additions & 2 deletions tests/testdata/run/045_proxy_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { Server } from "../../../../test_util/std/http/server.ts";
import { assertEquals } from "../../../../test_util/std/assert/mod.ts";
import { Server } from "../../../test_util/std/http/server.ts";
import { assertEquals } from "../../../test_util/std/assert/mod.ts";

const addr = Deno.args[1] || "localhost:4555";

Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/run/import_meta/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertThrows } from "../../../../../test_util/std/assert/mod.ts";
import { assertThrows } from "../../../../test_util/std/assert/mod.ts";
import "http://localhost:4545/run/import_meta/other.ts";
import "./other.ts";

Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/run/onload/imported.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// deno-lint-ignore-file no-window-prefix
import { assert } from "../../../../../test_util/std/assert/mod.ts";
import { assert } from "../../../../test_util/std/assert/mod.ts";
import "./nest_imported.ts";

const handler = (e: Event) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/run/onload/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// deno-lint-ignore-file no-window-prefix no-prototype-builtins
import { assert } from "../../../../../test_util/std/assert/mod.ts";
import { assert } from "../../../../test_util/std/assert/mod.ts";
import "./imported.ts";

assert(window.hasOwnProperty("onload"));
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/run/onload/nest_imported.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// deno-lint-ignore-file no-window-prefix
import { assert } from "../../../../../test_util/std/assert/mod.ts";
import { assert } from "../../../../test_util/std/assert/mod.ts";

const handler = (e: Event) => {
assert(e.type === "beforeunload" ? e.cancelable : !e.cancelable);
Expand Down
4 changes: 2 additions & 2 deletions tests/testdata/run/textproto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import type {
BufReader,
ReadLineResult,
} from "../../../../test_util/std/io/buf_reader.ts";
import { concat } from "../../../../test_util/std/bytes/concat.ts";
} from "../../../test_util/std/io/buf_reader.ts";
import { concat } from "../../../test_util/std/bytes/concat.ts";

// Constants created for DRY
const CHAR_SPACE: number = " ".charCodeAt(0);
Expand Down
4 changes: 2 additions & 2 deletions tests/testdata/run/tls_connecttls.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert, assertEquals } from "../../../../test_util/std/assert/mod.ts";
import { BufReader, BufWriter } from "../../../../test_util/std/io/mod.ts";
import { assert, assertEquals } from "../../../test_util/std/assert/mod.ts";
import { BufReader, BufWriter } from "../../../test_util/std/io/mod.ts";
import { TextProtoReader } from "./textproto.ts";

const encoder = new TextEncoder();
Expand Down
6 changes: 3 additions & 3 deletions tests/testdata/run/tls_starttls.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assert, assertEquals } from "../../../../test_util/std/assert/mod.ts";
import { BufReader } from "../../../../test_util/std/io/buf_reader.ts";
import { BufWriter } from "../../../../test_util/std/io/buf_writer.ts";
import { assert, assertEquals } from "../../../test_util/std/assert/mod.ts";
import { BufReader } from "../../../test_util/std/io/buf_reader.ts";
import { BufWriter } from "../../../test_util/std/io/buf_writer.ts";
import { TextProtoReader } from "./textproto.ts";

const encoder = new TextEncoder();
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/run/websocket_server_idletimeout.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "../../../../test_util/std/assert/mod.ts";
import { assertEquals } from "../../../test_util/std/assert/mod.ts";

const errorDeferred = Promise.withResolvers<void>();
const closeDeferred = Promise.withResolvers<void>();
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/run/websocket_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
assertEquals,
assertThrows,
fail,
} from "../../../../test_util/std/assert/mod.ts";
} from "../../../test_util/std/assert/mod.ts";

Deno.test("invalid scheme", () => {
assertThrows(() => new WebSocket("foo://localhost:4242"));
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/run/websocketstream_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
assertRejects,
assertThrows,
unreachable,
} from "../../../../test_util/std/assert/mod.ts";
} from "../../../test_util/std/assert/mod.ts";

Deno.test("fragment", () => {
assertThrows(() => new WebSocketStream("ws://localhost:4242/#"));
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/test/allow_all.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "../../../../test_util/std/assert/mod.ts";
import { assertEquals } from "../../../test_util/std/assert/mod.ts";

const permissions: Deno.PermissionName[] = [
"read",
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/test/allow_none.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { unreachable } from "../../../../test_util/std/assert/mod.ts";
import { unreachable } from "../../../test_util/std/assert/mod.ts";

const permissions: Deno.PermissionName[] = [
"read",
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/test/ops_sanitizer_missing_details.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://github.com/denoland/deno/issues/13729
// https://github.com/denoland/deno/issues/13938
import { writeAll } from "../../../../test_util/std/streams/write_all.ts";
import { writeAll } from "../../../test_util/std/streams/write_all.ts";

Deno.test("test 1", { permissions: { write: true, read: true } }, async () => {
const tmpFile = await Deno.makeTempFile();
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/workers/deno_worker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from "../../../../test_util/std/assert/mod.ts";
import { assert } from "../../../test_util/std/assert/mod.ts";

onmessage = function (e) {
if (typeof self.Deno === "undefined") {
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/workers/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
assertEquals,
assertMatch,
assertThrows,
} from "../../../../test_util/std/assert/mod.ts";
} from "../../../test_util/std/assert/mod.ts";

Deno.test({
name: "worker terminate",
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/blob_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals, assertStringIncludes } from "./test_util.ts";
import { concat } from "../../../test_util/std/bytes/concat.ts";
import { concat } from "../../test_util/std/bytes/concat.ts";

Deno.test(function blobString() {
const b1 = new Blob(["Hello World"]);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/broadcast_channel_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { assertEquals } from "../../../test_util/std/assert/mod.ts";
import { assertEquals } from "../../test_util/std/assert/mod.ts";

Deno.test("BroadcastChannel worker", async () => {
const intercom = new BroadcastChannel("intercom");
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/console_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
assertStringIncludes,
assertThrows,
} from "./test_util.ts";
import { stripColor } from "../../../test_util/std/fmt/colors.ts";
import { stripColor } from "../../test_util/std/fmt/colors.ts";

const customInspect = Symbol.for("Deno.customInspect");
const {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/fetch_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
fail,
unimplemented,
} from "./test_util.ts";
import { Buffer } from "../../../test_util/std/io/buffer.ts";
import { Buffer } from "../../test_util/std/io/buffer.ts";

const listenPort = 4506;

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/files_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
assertRejects,
assertThrows,
} from "./test_util.ts";
import { copy } from "../../../test_util/std/streams/copy.ts";
import { copy } from "../../test_util/std/streams/copy.ts";

Deno.test(function filesStdioFileDescriptors() {
assertEquals(Deno.stdin.rid, 0);
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/http_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { Buffer, BufReader, BufWriter } from "../../../test_util/std/io/mod.ts";
import { Buffer, BufReader, BufWriter } from "../../test_util/std/io/mod.ts";
import { TextProtoReader } from "../testdata/run/textproto.ts";
import {
assert,
Expand All @@ -10,7 +10,7 @@ import {
delay,
fail,
} from "./test_util.ts";
import { join } from "../../../test_util/std/path/mod.ts";
import { join } from "../../test_util/std/path/mod.ts";

const listenPort = 4507;
const listenPort2 = 4508;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/io_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { assertEquals } from "./test_util.ts";
import { Buffer } from "../../../test_util/std/io/buffer.ts";
import { Buffer } from "../../test_util/std/io/buffer.ts";

const DEFAULT_BUF_SIZE = 32 * 1024;

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/kv_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
assertRejects,
assertThrows,
} from "./test_util.ts";
import { assertType, IsExact } from "../../../test_util/std/testing/types.ts";
import { assertType, IsExact } from "../../test_util/std/testing/types.ts";

const sleep = (time: number) => new Promise((r) => setTimeout(r, time));

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/message_channel_test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// NOTE: these are just sometests to test the TypeScript types. Real coverage is
// provided by WPT.
import { assert, assertEquals } from "../../../test_util/std/assert/mod.ts";
import { assert, assertEquals } from "../../test_util/std/assert/mod.ts";

Deno.test("messagechannel", async () => {
const mc = new MessageChannel();
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/serve_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import {
assertMatch,
assertRejects,
} from "../../../test_util/std/assert/mod.ts";
import { Buffer, BufReader, BufWriter } from "../../../test_util/std/io/mod.ts";
} from "../../test_util/std/assert/mod.ts";
import { Buffer, BufReader, BufWriter } from "../../test_util/std/io/mod.ts";
import { TextProtoReader } from "../testdata/run/textproto.ts";
import {
assert,
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/test_util.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

import * as colors from "../../../test_util/std/fmt/colors.ts";
import * as colors from "../../test_util/std/fmt/colors.ts";
export { colors };
import { join, resolve } from "../../../test_util/std/path/mod.ts";
import { join, resolve } from "../../test_util/std/path/mod.ts";
export {
assert,
assertEquals,
Expand All @@ -19,10 +19,10 @@ export {
fail,
unimplemented,
unreachable,
} from "../../../test_util/std/assert/mod.ts";
export { delay } from "../../../test_util/std/async/delay.ts";
export { readLines } from "../../../test_util/std/io/read_lines.ts";
export { parse as parseArgs } from "../../../test_util/std/flags/mod.ts";
} from "../../test_util/std/assert/mod.ts";
export { delay } from "../../test_util/std/async/delay.ts";
export { readLines } from "../../test_util/std/io/read_lines.ts";
export { parse as parseArgs } from "../../test_util/std/flags/mod.ts";

export function pathToAbsoluteFileUrl(path: string): URL {
path = resolve(path);
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/tls_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
assertStrictEquals,
assertThrows,
} from "./test_util.ts";
import { BufReader, BufWriter } from "../../../test_util/std/io/mod.ts";
import { readAll } from "../../../test_util/std/streams/read_all.ts";
import { writeAll } from "../../../test_util/std/streams/write_all.ts";
import { BufReader, BufWriter } from "../../test_util/std/io/mod.ts";
import { readAll } from "../../test_util/std/streams/read_all.ts";
import { writeAll } from "../../test_util/std/streams/write_all.ts";
import { TextProtoReader } from "../testdata/run/textproto.ts";

const encoder = new TextEncoder();
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/urlpattern_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals } from "./test_util.ts";
import { assertType, IsExact } from "../../../test_util/std/testing/types.ts";
import { assertType, IsExact } from "../../test_util/std/testing/types.ts";

Deno.test(function urlPatternFromString() {
const pattern = new URLPattern("https://deno.land/foo/:bar");
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_node/_fs/_fs_access_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as fs from "node:fs";
import {
assertRejects,
assertThrows,
} from "../../../../test_util/std/assert/mod.ts";
} from "../../../test_util/std/assert/mod.ts";

Deno.test(
"[node/fs.access] Uses the owner permission when the user is the owner",
Expand Down
Loading

0 comments on commit 0d69bbb

Please sign in to comment.