tests: add basic integration tests (#13)

This commit is contained in:
Luca Casonato
2021-06-02 01:16:31 +02:00
committed by GitHub
parent cfe2584669
commit 26189cfdf3
13 changed files with 137 additions and 3 deletions
+9
View File
@@ -0,0 +1,9 @@
import { h } from "../deps.ts";
interface Props {
params: Record<string, string | string[]>;
}
export default function Greet(props: Props) {
return <div>Hello {props.params.name}</div>;
}
+5
View File
@@ -0,0 +1,5 @@
import { oak } from "../../api_deps.ts";
export default (ctx: oak.Context) => {
ctx.response.body = { name: "fresh" };
};
+9
View File
@@ -0,0 +1,9 @@
import { h, IS_BROWSER, useState } from "../deps.ts";
export default function Home() {
return (
<div>
<p>{IS_BROWSER ? "Viewing browser render." : "Viewing JIT render."}</p>
</div>
);
}