diff options
Diffstat (limited to 'cli/tests/module_graph')
15 files changed, 59 insertions, 0 deletions
diff --git a/cli/tests/module_graph/file_tests-main.ts b/cli/tests/module_graph/file_tests-main.ts new file mode 100644 index 000000000..aa8eef1b8 --- /dev/null +++ b/cli/tests/module_graph/file_tests-main.ts @@ -0,0 +1,4 @@ +// @deno-types="https://deno.land/x/lib/mod.d.ts" +import * as lib from "https://deno.land/x/lib/mod.js"; + +console.log(lib); diff --git a/cli/tests/module_graph/https_deno.land-x-a.ts b/cli/tests/module_graph/https_deno.land-x-a.ts new file mode 100644 index 000000000..a6e3cea80 --- /dev/null +++ b/cli/tests/module_graph/https_deno.land-x-a.ts @@ -0,0 +1 @@ +export const a = "hello"; diff --git a/cli/tests/module_graph/https_deno.land-x-import_map.ts b/cli/tests/module_graph/https_deno.land-x-import_map.ts new file mode 100644 index 000000000..e285d863a --- /dev/null +++ b/cli/tests/module_graph/https_deno.land-x-import_map.ts @@ -0,0 +1,4 @@ +import * as $ from "jquery"; +import * as _ from "lodash"; + +console.log($, _); diff --git a/cli/tests/module_graph/https_deno.land-x-jquery.js b/cli/tests/module_graph/https_deno.land-x-jquery.js new file mode 100644 index 000000000..71896157a --- /dev/null +++ b/cli/tests/module_graph/https_deno.land-x-jquery.js @@ -0,0 +1,3 @@ +const $ = {}; + +export default $; diff --git a/cli/tests/module_graph/https_deno.land-x-lib-a.ts b/cli/tests/module_graph/https_deno.land-x-lib-a.ts new file mode 100644 index 000000000..a0a6f8e94 --- /dev/null +++ b/cli/tests/module_graph/https_deno.land-x-lib-a.ts @@ -0,0 +1 @@ +export const a: string[] = []; diff --git a/cli/tests/module_graph/https_deno.land-x-lib-b.js b/cli/tests/module_graph/https_deno.land-x-lib-b.js new file mode 100644 index 000000000..13cacdd8b --- /dev/null +++ b/cli/tests/module_graph/https_deno.land-x-lib-b.js @@ -0,0 +1 @@ +export const b = []; diff --git a/cli/tests/module_graph/https_deno.land-x-lib-c.d.ts b/cli/tests/module_graph/https_deno.land-x-lib-c.d.ts new file mode 100644 index 000000000..fac988e49 --- /dev/null +++ b/cli/tests/module_graph/https_deno.land-x-lib-c.d.ts @@ -0,0 +1 @@ +export const c: string[]; diff --git a/cli/tests/module_graph/https_deno.land-x-lib-c.js b/cli/tests/module_graph/https_deno.land-x-lib-c.js new file mode 100644 index 000000000..620ca0b66 --- /dev/null +++ b/cli/tests/module_graph/https_deno.land-x-lib-c.js @@ -0,0 +1,3 @@ +/// <reference types="./c.d.ts" /> + +export const c = []; diff --git a/cli/tests/module_graph/https_deno.land-x-lib-mod.d.ts b/cli/tests/module_graph/https_deno.land-x-lib-mod.d.ts new file mode 100644 index 000000000..76ed81df0 --- /dev/null +++ b/cli/tests/module_graph/https_deno.land-x-lib-mod.d.ts @@ -0,0 +1,9 @@ +export * as a from "./a.ts"; +export * as b from "./b.js"; +export * as c from "./c.js"; + +export interface A { + a: string; +} + +export const mod: A[]; diff --git a/cli/tests/module_graph/https_deno.land-x-lib-mod.js b/cli/tests/module_graph/https_deno.land-x-lib-mod.js new file mode 100644 index 000000000..505162094 --- /dev/null +++ b/cli/tests/module_graph/https_deno.land-x-lib-mod.js @@ -0,0 +1,5 @@ +export * as a from "./a.ts"; +export * as b from "./b.js"; +export * as c from "./c.js"; + +export const mod = []; diff --git a/cli/tests/module_graph/https_deno.land-x-mod.ts b/cli/tests/module_graph/https_deno.land-x-mod.ts new file mode 100644 index 000000000..35d76ef75 --- /dev/null +++ b/cli/tests/module_graph/https_deno.land-x-mod.ts @@ -0,0 +1,3 @@ +import * as a from "./a.ts"; + +console.log(a); diff --git a/cli/tests/module_graph/https_deno.land-x-transpile.tsx b/cli/tests/module_graph/https_deno.land-x-transpile.tsx new file mode 100644 index 000000000..23167d2ff --- /dev/null +++ b/cli/tests/module_graph/https_deno.land-x-transpile.tsx @@ -0,0 +1,5 @@ +export default class A { + render() { + return (<div>Hello world!</div>); + } +} diff --git a/cli/tests/module_graph/https_unpkg.com-lodash-index.js b/cli/tests/module_graph/https_unpkg.com-lodash-index.js new file mode 100644 index 000000000..d16c126a6 --- /dev/null +++ b/cli/tests/module_graph/https_unpkg.com-lodash-index.js @@ -0,0 +1,3 @@ +const _ = {}; + +export default _; diff --git a/cli/tests/module_graph/lockfile.json b/cli/tests/module_graph/lockfile.json new file mode 100644 index 000000000..03cfe1185 --- /dev/null +++ b/cli/tests/module_graph/lockfile.json @@ -0,0 +1,8 @@ +{ + "https://deno.land/x/lib/a.ts": "4437fee72a750d9540a9575ea6426761d0aa1beedfa308fb1bc38701d97011b8", + "https://deno.land/x/lib/b.js": "093cc4164ca7a9adb11597ad291e021634f0b2d8c048137f7e9fb0d709499028", + "https://deno.land/x/lib/c.d.ts": "a95647377477cc663559f5e857bf318c584622ed1295a8ccb0c091d06bee0456", + "https://deno.land/x/lib/c.js": "4ff934f4b3b06f320c3130326376d9f2435e2ecedd582940ca90938137d004e1", + "https://deno.land/x/lib/mod.d.ts": "e54b994fbf63cb7f01076ea54f2ed67b185f2a48e8ff71d74bd9c8180a338eb7", + "https://deno.land/x/lib/mod.js": "3f6fcb8ef83ed6c66e71774d5079d14d22a6948dc6e5358ac30e0ab55e1a6404" +} diff --git a/cli/tests/module_graph/lockfile_fail.json b/cli/tests/module_graph/lockfile_fail.json new file mode 100644 index 000000000..c0019fba4 --- /dev/null +++ b/cli/tests/module_graph/lockfile_fail.json @@ -0,0 +1,8 @@ +{ + "https://deno.land/x/lib/a.ts": "4437fee72a750d9540a9575ea6426761d0aa1beedfa308fb1bc38701d97011b8", + "https://deno.land/x/lib/b.js": "093cc4164ca7a9adb11597ad291e021634f0b2d8c048137f7e9fb0d709499028", + "https://deno.land/x/lib/c.d.ts": "a95647377477cc663559f5e857bf318c584622ed1295a8ccb0c091d06bee0456", + "https://deno.land/x/lib/c.js": "4ff934f4b3b06f320c3130326376d9f2435e2ecedd582940ca90938137d004e1", + "https://deno.land/x/lib/mod.d.ts": "e54b994fbf63cb7f01076ea54f2ed67b185f2a48e8ff71d74bd9c8180a338eb7", + "https://deno.land/x/lib/mod.js": "3f6fcb8ef83fd6c66e71774d5079d14d22a6948dc6e5358ac30e0ab55e1a6404" +} |