Skip to content

Commit 96e77b9

Browse files
committed
upgrade ajv and typescript
1 parent ba758e3 commit 96e77b9

8 files changed

Lines changed: 338 additions & 219 deletions

File tree

__tests__/main.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('Github action results', () => {
5252
try {
5353
// Act
5454
cp.execSync(`node ${ip}`, options);
55-
} catch (ex) {
55+
} catch (ex: any) {
5656
// Assert
5757
expect(ex).not.toBeUndefined();
5858
expect(ex.output).not.toBeUndefined();
@@ -73,7 +73,7 @@ describe('Github action results', () => {
7373
try {
7474
// Act
7575
cp.execSync(`node ${ip}`, options);
76-
} catch (ex) {
76+
} catch (ex: any) {
7777
// Assert
7878
expect(ex).not.toBeUndefined();
7979
expect(ex.output).not.toBeUndefined();
@@ -94,7 +94,7 @@ describe('Github action results', () => {
9494
try {
9595
// Act
9696
cp.execSync(`node ${ip}`, options);
97-
} catch (ex) {
97+
} catch (ex: any) {
9898
// Assert
9999
expect(ex).not.toBeUndefined();
100100
expect(ex.output).not.toBeUndefined();
@@ -118,7 +118,7 @@ describe('Github action results', () => {
118118
try {
119119
// Act
120120
cp.execSync(`node ${ip}`, options);
121-
} catch (ex) {
121+
} catch (ex: any) {
122122
// Assert
123123
expect(ex).not.toBeUndefined();
124124
expect(ex.output).not.toBeUndefined();
@@ -142,7 +142,7 @@ describe('Github action results', () => {
142142
try {
143143
// Act
144144
cp.execSync(`node ${ip}`, options);
145-
} catch (ex) {
145+
} catch (ex: any) {
146146
// Assert
147147
expect(ex).not.toBeUndefined();
148148
expect(ex.output).not.toBeUndefined();
@@ -165,7 +165,7 @@ describe('Github action results', () => {
165165
try {
166166
// Act
167167
cp.execSync(`node ${ip}`, options);
168-
} catch (ex) {
168+
} catch (ex: any) {
169169
// Assert
170170
expect(ex).not.toBeUndefined();
171171
expect(ex.output).not.toBeUndefined();
@@ -188,7 +188,7 @@ describe('Github action results', () => {
188188
try {
189189
// Act
190190
cp.execSync(`node ${ip}`, options);
191-
} catch (ex) {
191+
} catch (ex: any) {
192192
// Assert
193193
expect(ex).not.toBeUndefined();
194194
expect(ex.output).not.toBeUndefined();

__tests__/schema-validator.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('Validate JSON matches schema', () => {
3838
});
3939

4040
test('should return true when validating JSON data that matches the schema', async () => {
41-
const mockedValidator = jest.fn().mockReturnValue(true);
41+
const mockedValidator = jest.fn().mockReturnValue(true) as any;
4242

4343
const result = await schemaValidator.validate(validData, mockedValidator);
4444
expect(result).toBe(true);
@@ -47,7 +47,7 @@ describe('Validate JSON matches schema', () => {
4747
});
4848

4949
test("should throw an error when validating JSON data that doesn't match the schema", async () => {
50-
const mockedValidator = jest.fn().mockReturnValue(false);
50+
const mockedValidator = jest.fn().mockReturnValue(false) as any;
5151
(betterAjvErrors as jest.Mock<any>).mockImplementation(() => 'Some errors');
5252

5353
const task = schemaValidator.validate(invalidData, mockedValidator);

0 commit comments

Comments
 (0)