1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-05 05:49:20 -05:00

Fix example (#5775)

This commit is contained in:
guzhongren 2020-05-23 22:16:57 +08:00 committed by GitHub
parent 6feca0ef8b
commit 94f1de5f80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,7 @@ declare namespace Deno {
* *
* Deno.test({ * Deno.test({
* name: "example ignored test", * name: "example ignored test",
* ignore: Deno.build.os === "windows" * ignore: Deno.build.os === "windows",
* fn(): void { * fn(): void {
* // This test is ignored only on Windows machines * // This test is ignored only on Windows machines
* }, * },
@ -73,7 +73,7 @@ declare namespace Deno {
* async fn() { * async fn() {
* const decoder = new TextDecoder("utf-8"); * const decoder = new TextDecoder("utf-8");
* const data = await Deno.readFile("hello_world.txt"); * const data = await Deno.readFile("hello_world.txt");
* assertEquals(decoder.decode(data), "Hello world") * assertEquals(decoder.decode(data), "Hello world");
* } * }
* }); * });
* ``` * ```
@ -94,7 +94,7 @@ declare namespace Deno {
* Deno.test("My async test description", async ():Promise<void> => { * Deno.test("My async test description", async ():Promise<void> => {
* const decoder = new TextDecoder("utf-8"); * const decoder = new TextDecoder("utf-8");
* const data = await Deno.readFile("hello_world.txt"); * const data = await Deno.readFile("hello_world.txt");
* assertEquals(decoder.decode(data), "Hello world") * assertEquals(decoder.decode(data), "Hello world");
* }); * });
* ``` * ```
* */ * */
@ -1828,7 +1828,7 @@ declare namespace Deno {
* ```ts * ```ts
* const obj = {}; * const obj = {};
* obj.propA = 10; * obj.propA = 10;
* obj.propB = "hello" * obj.propB = "hello";
* const objAsString = Deno.inspect(obj); // { propA: 10, propB: "hello" } * const objAsString = Deno.inspect(obj); // { propA: 10, propB: "hello" }
* console.log(obj); // prints same value as objAsString, e.g. { propA: 10, propB: "hello" } * console.log(obj); // prints same value as objAsString, e.g. { propA: 10, propB: "hello" }
* ``` * ```