Skip to content

Commit 4d3af8c

Browse files
authored
Merge pull request #3 from kobenguyent/type-fix
fix: add tying def
2 parents a8b234f + f8a3040 commit 4d3af8c

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

index.d.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
declare class ExpectHelper {
2+
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
3+
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
4+
expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
5+
expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
6+
expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: string): void;
7+
expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: string): void;
8+
expectStartsWith(actualValue: string, expectedValueToStartWith: string, customErrorMsg?: string): void;
9+
expectNotStartsWith(actualValue: string, expectedValueToNotStartWith: string, customErrorMsg?: string): void;
10+
expectEndsWith(actualValue: string, expectedValueToEndWith: string, customErrorMsg?: string): void;
11+
expectNotEndsWith(actualValue: string, expectedValueToNotEndWith: string, customErrorMsg?: string): void;
12+
expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: string): void;
13+
expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: string, ajvOptions?: any): void;
14+
expectHasProperty(targetData: any, propertyName: string, customErrorMsg?: string): void;
15+
expectToBeA(targetData: any, type: string, customErrorMsg?: string): void;
16+
expectToBeAn(targetData: any, type: string, customErrorMsg?: string): void;
17+
expectMatchRegex(targetData: string, regex: RegExp, customErrorMsg?: string): void;
18+
expectLengthOf(targetData: any, length: number, customErrorMsg?: string): void;
19+
expectEmpty(targetData: any, customErrorMsg?: string): void;
20+
expectTrue(targetData: any, customErrorMsg?: string): void;
21+
expectFalse(targetData: any, customErrorMsg?: string): void;
22+
expectAbove(targetData: number, aboveThan: number, customErrorMsg?: string): void;
23+
expectBelow(targetData: number, belowThan: number, customErrorMsg?: string): void;
24+
expectDeepMembers(actualValue: any[], expectedValue: any[], customErrorMsg?: string): void;
25+
expectDeepIncludeMembers(superset: any[], set: any[], customErrorMsg?: string): void;
26+
expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: string | string[], customErrorMsg?: string): void;
27+
expectMatchesPattern(actualValue: object, expectedPattern: object, customErrorMsg?: string): void;
28+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.2.1",
44
"description": "Expect helper for CodeceptJS",
55
"type": "module",
6+
"types": "index.d.ts",
67
"main": "index.js",
78
"scripts": {
89
"test": "mocha index_test.js"

0 commit comments

Comments
 (0)