tests: add basic integration tests (#13)
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { oak } from "../../api_deps.ts";
|
||||
|
||||
export default (ctx: oak.Context) => {
|
||||
ctx.response.body = { name: "fresh" };
|
||||
};
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user