Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback


Deno standard library
Go to Latest
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { test } from "./test.ts";import { extract } from "./json.ts";import { runExtractJSONTests, runExtractTypeErrorTests, runTestInvalidInputTests, runTestValidInputTests,} from "./_test_utils.ts";
Deno.test("test() handles valid input", () => { runTestValidInputTests("json", test);});
Deno.test("test() handles invalid input", () => { runTestInvalidInputTests("json", test);});
Deno.test("json() extracts type error on invalid input", () => { runExtractTypeErrorTests("json", extract);});
Deno.test("json() parses json delineate by ---json", async () => { await runExtractJSONTests(extract);});