1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

chore: deprecate run itests (#26444)

This commit is contained in:
Mohammad Sulaiman 2024-11-05 08:39:05 +02:00 committed by GitHub
parent f9a05068d6
commit 89f0b796bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
1656 changed files with 7496 additions and 1936 deletions

View file

@ -65,7 +65,11 @@
"tests/wpt/runner/expectation.json",
"tests/wpt/runner/manifest.json",
"tests/wpt/suite",
"third_party"
"third_party",
"tests/specs/run/shebang_with_json_imports_tsc",
"tests/specs/run/shebang_with_json_imports_swc",
"tests/specs/run/ext_flag_takes_precedence_over_extension",
"tests/specs/run/error_syntax_empty_trailing_line/error_syntax_empty_trailing_line.mjs"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.93.2.wasm",

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
console.log("Hello World");

View file

@ -0,0 +1,4 @@
{
"args": "run --reload 001_hello.js",
"output": "001_hello.js.out"
}

View file

@ -0,0 +1 @@
console.log("Hello World");

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload 002_hello.ts",
"output": "002_hello.ts.out"
}

View file

@ -0,0 +1,3 @@
import { printHello } from "./print_hello.ts";
printHello();

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload 003_relative_import.ts",
"output": "003_relative_import.ts.out"
}

View file

@ -0,0 +1,3 @@
export function printHello() {
console.log("Hello");
}

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload 004_set_timeout.ts",
"output": "004_set_timeout.ts.out"
}

View file

@ -1,4 +1,4 @@
import { printHello3, returnsFoo2, returnsHi } from "../subdir/mod1.ts";
import { printHello3, returnsFoo2, returnsHi } from "./mod1.ts";
printHello3();

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload 005_more_imports.ts",
"output": "005_more_imports.ts.out"
}

View file

@ -0,0 +1,17 @@
import { printHello2, returnsFoo } from "./subdir2/mod2.ts";
export function returnsHi(): string {
return "Hi";
}
export function returnsFoo2(): string {
return returnsFoo();
}
export function printHello3() {
printHello2();
}
export function throwsError() {
throw Error("exception from mod1");
}

View file

@ -0,0 +1,3 @@
export function printHello() {
console.log("Hello");
}

View file

@ -0,0 +1,9 @@
import { printHello } from "../print_hello.ts";
export function returnsFoo(): string {
return "Foo";
}
export function printHello2() {
printHello();
}

View file

@ -0,0 +1,3 @@
import { printHello } from "http://localhost:4545/subdir/mod2.ts";
printHello();
console.log("success");

View file

@ -0,0 +1,2 @@
Hello
success

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload --allow-import 006_url_imports.ts",
"output": "006_url_imports.ts.out"
}

View file

@ -0,0 +1,3 @@
export function printHello() {
console.log("Hello");
}

View file

@ -0,0 +1,9 @@
import { printHello } from "../print_hello.ts";
export function returnsFoo(): string {
return "Foo";
}
export function printHello2() {
printHello();
}

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload 012_async.ts",
"output": "012_async.ts.out"
}

View file

@ -0,0 +1,15 @@
(async () => {
const { returnsHi, returnsFoo2, printHello3 } = await import(
"./mod1.ts"
);
printHello3();
if (returnsHi() !== "Hi") {
throw Error("Unexpected");
}
if (returnsFoo2() !== "Foo") {
throw Error("Unexpected");
}
})();

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload --allow-read 013_dynamic_import.ts",
"output": "013_dynamic_import.ts.out"
}

View file

@ -0,0 +1,17 @@
import { printHello2, returnsFoo } from "./subdir2/mod2.ts";
export function returnsHi(): string {
return "Hi";
}
export function returnsFoo2(): string {
return returnsFoo();
}
export function printHello3() {
printHello2();
}
export function throwsError() {
throw Error("exception from mod1");
}

View file

@ -0,0 +1,3 @@
export function printHello() {
console.log("Hello");
}

View file

@ -0,0 +1,9 @@
import { printHello } from "../print_hello.ts";
export function returnsFoo(): string {
return "Foo";
}
export function printHello2() {
printHello();
}

View file

@ -0,0 +1,9 @@
// with all the imports of the same module, the module should only be
// instantiated once
import "./auto_print_hello.ts";
import "./auto_print_hello.ts";
(async () => {
await import("./auto_print_hello.ts");
})();

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload --allow-read 014_duplicate_import.ts ",
"output": "014_duplicate_import.ts.out"
}

View file

@ -0,0 +1,2 @@
console.log("hello!");
export default {};

View file

@ -3,7 +3,7 @@
const promises = new Array(100)
.fill(null)
.map(() => import("../subdir/mod1.ts"));
.map(() => import("./mod1.ts"));
Promise.all(promises).then((imports) => {
const mod = imports.reduce((first, cur) => {

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload --allow-read 015_duplicate_parallel_import.js",
"output": "015_duplicate_parallel_import.js.out"
}

View file

@ -0,0 +1,17 @@
import { printHello2, returnsFoo } from "./subdir2/mod2.ts";
export function returnsHi(): string {
return "Hi";
}
export function returnsFoo2(): string {
return returnsFoo();
}
export function printHello3() {
printHello2();
}
export function throwsError() {
throw Error("exception from mod1");
}

View file

@ -0,0 +1,3 @@
export function printHello() {
console.log("Hello");
}

View file

@ -0,0 +1,9 @@
import { printHello } from "../print_hello.ts";
export function returnsFoo(): string {
return "Foo";
}
export function printHello2() {
printHello();
}

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --allow-read --reload 016_double_await.ts",
"output": "016_double_await.ts.out"
}

View file

@ -0,0 +1,4 @@
// http -> https redirect would happen:
import { printHello } from "http://gist.githubusercontent.com/ry/f12b2aa3409e6b52645bc346a9e22929/raw/79318f239f51d764384a8bded8d7c6a833610dde/print_hello.ts";
printHello();

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --allow-import --reload --check 017_import_redirect.ts",
"output": "017_import_redirect.ts.out"
}

View file

@ -0,0 +1,4 @@
// http -> https redirect would happen:
import { printHello } from "http://gist.githubusercontent.com/ry/f12b2aa3409e6b52645bc346a9e22929/raw/79318f239f51d764384a8bded8d7c6a833610dde/print_hello.ts";
printHello();

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --allow-import --reload --check 017_import_redirect.ts",
"output": "017_import_redirect.ts.out"
}

View file

@ -0,0 +1,4 @@
// http -> https redirect would happen:
import { printHello } from "http://gist.githubusercontent.com/ry/f12b2aa3409e6b52645bc346a9e22929/raw/79318f239f51d764384a8bded8d7c6a833610dde/print_hello.ts";
printHello();

View file

@ -0,0 +1,4 @@
{
"args": "info --quiet --allow-import --reload 017_import_redirect.ts",
"output": "017_import_redirect_info.out"
}

View file

@ -0,0 +1,4 @@
// http -> https redirect would happen:
import { printHello } from "http://gist.githubusercontent.com/ry/f12b2aa3409e6b52645bc346a9e22929/raw/79318f239f51d764384a8bded8d7c6a833610dde/print_hello.ts";
printHello();

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --allow-import --reload --check 017_import_redirect.ts",
"output": "017_import_redirect.ts.out"
}

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload 018_async_catch.ts",
"output": "018_async_catch.ts.out"
}

View file

@ -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,
);

View file

@ -0,0 +1,4 @@
{
"args": "run --reload --allow-import 019_media_types.ts",
"output": "019_media_types.ts.out"
}

View file

@ -0,0 +1,2 @@
import config from "./config.json";
console.log(JSON.stringify(config));

View file

@ -1,3 +1,3 @@
error: Expected a JavaScript or TypeScript module, but identified a Json module. Consider importing Json modules with an import attribute with the type of "json".
Specifier: [WILDCARD]/subdir/config.json
Specifier: [WILDCARD]/config.json
[WILDCARD]

View file

@ -0,0 +1,5 @@
{
"args": "run --reload 020_json_modules.ts",
"output": "020_json_modules.ts.out",
"exitCode": 1
}

View file

@ -0,0 +1,6 @@
{
"foo": {
"bar": true,
"baz": ["qat", 1]
}
}

View file

@ -0,0 +1,2 @@
import { isMod5 } from "./mod5.mjs";
console.log(isMod5);

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload 021_mjs_modules.ts",
"output": "021_mjs_modules.ts.out"
}

View file

@ -0,0 +1 @@
export const isMod5 = true;

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload 025_reload_js_type_error.js",
"output": "025_reload_js_type_error.js.out"
}

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload --allow-import 027_redirect_typescript.ts",
"output": "027_redirect_typescript.ts.out"
}

View file

@ -0,0 +1,2 @@
import { value } from "http://localhost:4547/redirects/redirect4.ts";
console.log(value);

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload --vendor --allow-import 027_redirect_typescript.ts",
"output": "027_redirect_typescript.ts.out"
}

View file

@ -0,0 +1 @@
export const redirect = 1;

View file

@ -0,0 +1,2 @@
import { redirect } from "./redirect1.ts";
export const value = `4 imports ${redirect}`;

View file

@ -0,0 +1,9 @@
{
"modules": {
"http://localhost:4547/redirects/redirect4.ts": {
"headers": {
"location": "http://localhost:4545/subdir/redirects/redirect4.ts"
}
}
}
}

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload 028_args.ts --arg1 val1 --arg2=val2 -- arg3 arg4",
"output": "028_args.ts.out"
}

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload --allow-import --import-map=data:application/json;charset=utf-8;base64,ewogICJpbXBvcnRzIjogewogICAgInRlc3Rfc2VydmVyLyI6ICJodHRwOi8vbG9jYWxob3N0OjQ1NDUvIgogIH0KfQ== test_data.ts",
"output": "test_data.ts.out"
}

View file

@ -0,0 +1 @@
console.log("Hello from remapped lodash!");

View file

@ -0,0 +1 @@
console.log("Hello from remapped lodash dir!");

View file

@ -0,0 +1,4 @@
{
"args": "run --quiet --reload --allow-import --import-map=import_map_remote.json test_remote.ts",
"output": "033_import_map_remote.out"
}

View file

@ -0,0 +1,10 @@
{
"imports": {
"moment": "./moment/moment.ts",
"moment/": "./moment/",
"lodash": "./lodash/lodash.ts",
"lodash/": "./lodash/",
"https://www.unpkg.com/vue/dist/vue.runtime.esm.js": "./vue.ts",
"print_hello": "./print_hello.ts"
}
}

View file

@ -0,0 +1 @@
console.log("Hello from remapped lodash!");

View file

@ -0,0 +1 @@
console.log("Hello from remapped lodash dir!");

View file

@ -0,0 +1 @@
console.log("Hello from remapped moment!");

Some files were not shown because too many files have changed in this diff Show more