We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f83aaf commit 3ae4136Copy full SHA for 3ae4136
packages/jest-util/src/isPromise.ts
@@ -1,3 +1,10 @@
1
+/**
2
+ * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
// see ES2015 spec 25.4.4.5, https://stackoverflow.com/a/38339199
9
const isPromise = (candidate: unknown): candidate is Promise<unknown> =>
10
Promise.resolve(candidate) === candidate;
0 commit comments