blob: a397b3012b365525609b2173963b4218b10f6dce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// 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
);
});
|