• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16export interface Assert {
17    (expression: any, message?: string): asserts expression;
18    /**
19     * Asserts non-strict equality (==) of actual and expected.
20     */
21    equal<T>(actual: T, expected: T, message?: string): void;
22    /**
23     * Asserts non-strict inequality (!=) of actual and expected.
24     */
25    notEqual<T>(actual: T, expected: T, message?: string): void;
26    /**
27     * Asserts strict equality (===) of actual and expected.
28     */
29    strictEqual<T>(actual: T, expected: T, message?: string): void;
30    /**
31     * Asserts strict inequality (!==) of actual and expected.
32     */
33    notStrictEqual<T>(actual: T, expected: T, message?: string): void;
34    deepEqual(actual: any, expected: any, message?: string): void;
35    notDeepEqual(actual: any, expected: any, message?: string): void;
36    isTrue(value: any, message?: string): void;
37    isFalse(value: any, message?: string): void;
38    closeTo(actual: number, expected: number, delta: number, message?: string): void;
39    fail(message?: string): void;
40    isNull(value: any, message?: string): void;
41    isNotNull(value: any, message?: string): void;
42    instanceOf(value: any, constructor: Function, message?: string): void;
43    isAtLeast(valueToCheck: number, valueToBeAtLeast: number, message?: string): void;
44    exists(value: any, message?: string): void;
45    throw(fn: () => void, message?: string): void;
46    throws(fn: () => void, message?: string): void;
47    isAbove(valueToCheck: number, valueToBeAbove: number, message?: string): void;
48    isBelow(valueToCheck: number, valueToBeBelow: number, message?: string): void;
49    match(value: string, regexp: RegExp, message?: string): void;
50    isDefined(value: any, message?: string): void;
51    isUndefined(value: any, message?: string): void;
52    isEmpty(object: any, message?: string): void;
53    isNotEmpty(object: any, message?: string): void;
54}
55export declare var assert: Assert;
56//# sourceMappingURL=index.d.ts.map