1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-29 02:29:06 -05:00
denoland-deno/util/deferred_test.ts
2019-02-15 11:03:57 -05:00

16 lines
400 B
TypeScript

// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { assert, test } from "../testing/mod.ts";
import { defer, isDeferred } from "./deferred.ts";
test(async function asyncIsDeferred() {
const d = defer();
assert.assert(isDeferred(d));
assert.assert(
isDeferred({
promise: null,
resolve: () => {},
reject: () => {}
}) === false
);
});