summaryrefslogtreecommitdiff
path: root/std/types/tests
diff options
context:
space:
mode:
authorSteven Guerrero <42647963+Soremwar@users.noreply.github.com>2020-04-13 12:15:18 -0500
committerGitHub <noreply@github.com>2020-04-13 13:15:18 -0400
commit8397cd52a5ec915a0b5e85d337cfcc38f4aaa63f (patch)
treea36ae457fd502205153dc7f3b1f777ff1bf40924 /std/types/tests
parent25bd6868e5af9f30656dabeff9683b256e0a9370 (diff)
Refactor std/types (#4713)
Diffstat (limited to 'std/types/tests')
-rw-r--r--std/types/tests/react-dom_mock.js9
-rw-r--r--std/types/tests/react-dom_test.tsx20
-rw-r--r--std/types/tests/react_mock.js9
-rw-r--r--std/types/tests/react_test.tsx23
4 files changed, 0 insertions, 61 deletions
diff --git a/std/types/tests/react-dom_mock.js b/std/types/tests/react-dom_mock.js
deleted file mode 100644
index cbc20958b..000000000
--- a/std/types/tests/react-dom_mock.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-
-const ReactDOM = {
- render(element) {
- return JSON.stringify(element);
- },
-};
-
-export default ReactDOM;
diff --git a/std/types/tests/react-dom_test.tsx b/std/types/tests/react-dom_test.tsx
deleted file mode 100644
index 738227b65..000000000
--- a/std/types/tests/react-dom_test.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-
-// @deno-types="../react.d.ts"
-import React from "./react_mock.js";
-// @deno-types="../react-dom.d.ts"
-import ReactDOM from "./react-dom_mock.js";
-
-import { assertEquals } from "../../testing/asserts.ts";
-
-const { test } = Deno;
-
-test({
- name: "ReactDOM is typed to render",
- fn() {
- assertEquals(
- ReactDOM.render(<div />, null),
- '"{\\"type\\":\\"div\\",\\"props\\":null,\\"children\\":[]}"'
- );
- }
-});
diff --git a/std/types/tests/react_mock.js b/std/types/tests/react_mock.js
deleted file mode 100644
index 3dec4f422..000000000
--- a/std/types/tests/react_mock.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-
-const React = {
- createElement(type, props, ...children) {
- return JSON.stringify({ type, props, children });
- },
-};
-
-export default React;
diff --git a/std/types/tests/react_test.tsx b/std/types/tests/react_test.tsx
deleted file mode 100644
index f9ffc471a..000000000
--- a/std/types/tests/react_test.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-
-// @deno-types="../react.d.ts"
-import React from "./react_mock.js";
-import { assertEquals } from "../../testing/asserts.ts";
-
-const { test } = Deno;
-
-test({
- name: "JSX can be rendered",
- fn() {
- class Component {
- render() {
- return <div></div>;
- }
- }
-
- assertEquals(
- new Component().render(),
- `{"type":"div","props":null,"children":[]}`
- );
- }
-});