mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
c46143f0ac
* chore: update copyright year * fix --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
27 lines
706 B
TypeScript
27 lines
706 B
TypeScript
// 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("[JSON] test valid input true", () => {
|
|
runTestValidInputTests("json", test);
|
|
});
|
|
|
|
Deno.test("[JSON] test invalid input false", () => {
|
|
runTestInvalidInputTests("json", test);
|
|
});
|
|
|
|
Deno.test("[JSON] extract type error on invalid input", () => {
|
|
runExtractTypeErrorTests("json", extract);
|
|
});
|
|
|
|
Deno.test("[JSON] parse json delineate by ---json", async () => {
|
|
await runExtractJSONTests(extract);
|
|
});
|