mirror of
https://github.com/denoland/deno.git
synced 2024-11-23 15:16:54 -05:00
57f4e6a864
Original: 8569f15207
16 lines
400 B
TypeScript
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
|
|
);
|
|
});
|