summaryrefslogtreecommitdiff
path: root/tests/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testdata')
-rw-r--r--tests/testdata/npm/esm_import_cjs_default/main.out51
-rw-r--r--tests/testdata/npm/esm_import_cjs_default/main.ts23
-rw-r--r--tests/testdata/npm/no_types_cjs/main.ts7
-rw-r--r--tests/testdata/npm/no_types_in_conditional_exports/main.out4
-rw-r--r--tests/testdata/npm/no_types_in_conditional_exports/main.ts2
-rw-r--r--tests/testdata/npm/types/main.out71
-rw-r--r--tests/testdata/npm/types/main.ts27
7 files changed, 0 insertions, 185 deletions
diff --git a/tests/testdata/npm/esm_import_cjs_default/main.out b/tests/testdata/npm/esm_import_cjs_default/main.out
deleted file mode 100644
index 0f6a61e34..000000000
--- a/tests/testdata/npm/esm_import_cjs_default/main.out
+++ /dev/null
@@ -1,51 +0,0 @@
-Node esm importing node cjs
-===========================
-{
- default: [Function (anonymous)],
- named: [Function (anonymous)],
- MyClass: [class MyClass]
-}
-{ default: [Function (anonymous)], named: [Function (anonymous)] }
-[Module: null prototype] {
- MyClass: [class MyClass],
- __esModule: true,
- default: {
- default: [Function (anonymous)],
- named: [Function (anonymous)],
- MyClass: [class MyClass]
- },
- named: [Function (anonymous)]
-}
-[Module: null prototype] {
- __esModule: true,
- default: { default: [Function (anonymous)], named: [Function (anonymous)] },
- named: [Function (anonymous)]
-}
-===========================
-static method
-Deno esm importing node cjs
-===========================
-{
- default: [Function (anonymous)],
- named: [Function (anonymous)],
- MyClass: [class MyClass]
-}
-[Module: null prototype] {
- MyClass: [class MyClass],
- __esModule: true,
- default: {
- default: [Function (anonymous)],
- named: [Function (anonymous)],
- MyClass: [class MyClass]
- },
- named: [Function (anonymous)]
-}
-===========================
-Deno esm importing node esm
-===========================
-[Function: default]
-[Module: null prototype] { default: [Function: default] }
-===========================
-1
-5
-static method
diff --git a/tests/testdata/npm/esm_import_cjs_default/main.ts b/tests/testdata/npm/esm_import_cjs_default/main.ts
deleted file mode 100644
index f9c3280e5..000000000
--- a/tests/testdata/npm/esm_import_cjs_default/main.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-// @ts-check
-import cjsDefault, {
- MyClass as MyCjsClass,
-} from "npm:@denotest/cjs-default-export";
-import * as cjsNamespace from "npm:@denotest/cjs-default-export";
-import esmDefault from "npm:@denotest/esm-import-cjs-default";
-import * as esmNamespace from "npm:@denotest/esm-import-cjs-default";
-
-console.log("Deno esm importing node cjs");
-console.log("===========================");
-console.log(cjsDefault);
-console.log(cjsNamespace);
-console.log("===========================");
-
-console.log("Deno esm importing node esm");
-console.log("===========================");
-console.log(esmDefault);
-console.log(esmNamespace);
-console.log("===========================");
-
-console.log(cjsDefault.default());
-console.log(esmDefault());
-console.log(MyCjsClass.someStaticMethod());
diff --git a/tests/testdata/npm/no_types_cjs/main.ts b/tests/testdata/npm/no_types_cjs/main.ts
deleted file mode 100644
index 32458e839..000000000
--- a/tests/testdata/npm/no_types_cjs/main.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import mod from "npm:@denotest/no-types-cjs";
-
-// it actually returns a `number` and has that in its
-// jsdocs, but the jsdocs should not have been resolved so
-// this should type check just fine
-const value: string = mod();
-console.log(value);
diff --git a/tests/testdata/npm/no_types_in_conditional_exports/main.out b/tests/testdata/npm/no_types_in_conditional_exports/main.out
deleted file mode 100644
index 46c583234..000000000
--- a/tests/testdata/npm/no_types_in_conditional_exports/main.out
+++ /dev/null
@@ -1,4 +0,0 @@
-Download http://localhost:4260/@denotest/no-types-in-conditional-exports
-Download http://localhost:4260/@denotest/no-types-in-conditional-exports/1.0.0.tgz
-Check [WILDCARD]npm/no_types_in_conditional_exports/main.ts
-{ foo: "bar" }
diff --git a/tests/testdata/npm/no_types_in_conditional_exports/main.ts b/tests/testdata/npm/no_types_in_conditional_exports/main.ts
deleted file mode 100644
index 7ec2f18fd..000000000
--- a/tests/testdata/npm/no_types_in_conditional_exports/main.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import foo from "npm:@denotest/no-types-in-conditional-exports@1.0.0";
-console.log(foo);
diff --git a/tests/testdata/npm/types/main.out b/tests/testdata/npm/types/main.out
deleted file mode 100644
index de1f2c145..000000000
--- a/tests/testdata/npm/types/main.out
+++ /dev/null
@@ -1,71 +0,0 @@
-error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'.
- bar: 1,
- ~~~
- at [WILDCARD]/npm/types/main.ts:[WILDCARD]
-
- The expected type comes from property 'bar' which is declared here on type 'Foobar'
- bar: string;
- ~~~
- at [WILDCARD]/@denotest/types_imported/1.0.0/subpath.d.ts:3:5
-
-TS2322 [ERROR]: Type 'number' is not assignable to type 'string'.
- prop: 1,
- ~~~~
- at [WILDCARD]/npm/types/main.ts:[WILDCARD]
-
- The expected type comes from property 'prop' which is declared here on type 'SomeInterface'
- prop: string;
- ~~~~
- at [WILDCARD]/@denotest/types_imported/1.0.0/index.d.ts:2:5
-
-TS2322 [ERROR]: Type 'string' is not assignable to type 'number'.
- prop2: "asdf",
- ~~~~~
- at [WILDCARD]/npm/types/main.ts:[WILDCARD]
-
- The expected type comes from property 'prop2' which is declared here on type 'SomeInterface'
- prop2: number;
- ~~~~~
- at [WILDCARD]/@denotest/types_imported/1.0.0/index.d.ts:3:5
-
-TS2322 [ERROR]: Type 'number' is not assignable to type 'string'.
- fizz: 1,
- ~~~~
- at [WILDCARD]/npm/types/main.ts:[WILDCARD]
-
- The expected type comes from property 'fizz' which is declared here on type 'Fizzbuzz'
- fizz: string;
- ~~~~
- at [WILDCARD]/@denotest/types/1.0.0/index.d.ts:2:3
-
-TS2322 [ERROR]: Type 'number' is not assignable to type 'string'.
- buzz: 2,
- ~~~~
- at [WILDCARD]/npm/types/main.ts:[WILDCARD]
-
- The expected type comes from property 'buzz' which is declared here on type 'Fizzbuzz'
- buzz: string;
- ~~~~
- at [WILDCARD]/@denotest/types/1.0.0/index.d.ts:3:3
-
-TS2322 [ERROR]: Type '5' is not assignable to type '"test1"'.
-const valueA: "test1" = getClient();
- ~~~~~~
- at [WILDCARD]/npm/types/main.ts:[WILDCARD]
-
-TS2322 [ERROR]: Type '"import"' is not assignable to type '"test2"'.
-const valueB: "test2" = entryImport();
- ~~~~~~
- at [WILDCARD]/types/main.ts:[WILDCARD]
-
-TS2322 [ERROR]: Type '12' is not assignable to type '"test3"'.
-const valueC: "test3" = entryA();
- ~~~~~~
- at [WILDCARD]/types/main.ts:[WILDCARD]
-
-TS2322 [ERROR]: Type '"types"' is not assignable to type '"test4"'.
-const valueD: "test4" = entryTypes();
- ~~~~~~
- at file:///[WILDCARD]/types/main.ts:[WILDCARD]
-
-Found 9 errors.
diff --git a/tests/testdata/npm/types/main.ts b/tests/testdata/npm/types/main.ts
deleted file mode 100644
index ae420f6d6..000000000
--- a/tests/testdata/npm/types/main.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import type { Fizzbuzz } from "npm:@denotest/types";
-import type { SomeInterface } from "npm:@denotest/types_imported";
-import type { Foobar as FooInterface } from "npm:@denotest/types_imported/subpath";
-import { getClient } from "npm:@denotest/types-exports-subpaths/client";
-import { entryImport } from "npm:@denotest/types-exports-subpaths/entry-import";
-import { entryA } from "npm:@denotest/types-exports-subpaths/entry-a";
-import { entryTypes } from "npm:@denotest/types-exports-subpaths/entry-types-last-no-declaration-before";
-
-const foobar: FooInterface = {
- foo: "foo",
- bar: 1,
-};
-
-const i: SomeInterface = {
- prop: 1,
- prop2: "asdf",
-};
-
-const fizzbuzz: Fizzbuzz = {
- fizz: 1,
- buzz: 2,
-};
-
-const valueA: "test1" = getClient();
-const valueB: "test2" = entryImport();
-const valueC: "test3" = entryA();
-const valueD: "test4" = entryTypes();