mirror of
https://github.com/denoland/deno.git
synced 2024-11-30 16:40:57 -05:00
20 lines
455 B
TypeScript
20 lines
455 B
TypeScript
|
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||
|
|
||
|
import { parse } from "../../yaml.ts";
|
||
|
|
||
|
const result = parse(`
|
||
|
test: toto
|
||
|
foo:
|
||
|
bar: True
|
||
|
baz: 1
|
||
|
qux: ~
|
||
|
`);
|
||
|
console.log(result);
|
||
|
|
||
|
const expected = '{ test: "toto", foo: { bar: true, baz: 1, qux: null } }';
|
||
|
if (Deno.inspect(result) === expected) {
|
||
|
console.log("Output is as expected.");
|
||
|
} else {
|
||
|
console.error("Error during parse. Output is not as expect.", expected);
|
||
|
}
|