Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
aliases:
- &container_config
docker:
- image: circleci/node:carbon
- image: circleci/node:lts

working_directory: ~/repo

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@
"@commitlint/config-conventional": "^8.1.0",
"@types/chai": "^4.1.7",
"@types/jest": "^24.0.13",
"@types/jest-diff": "^20.0.1",
"@types/jest-diff": "^24.3.0",
"@types/jest-matcher-utils": "^21.0.2",
"@types/mockdate": "^2.0.0",
"@types/node": "^12.0.4",
"@types/node": "^13.1.6",
"@types/uuid": "^3.4.4",
"chai": "^4.2.0",
"coveralls": "^3.0.6",
"husky": "^3.0.4",
"husky": "^4.0.7",
"jest": "^24.9.0",
"jest-junit": "^8.0.0",
"jest-junit": "^10.0.0",
"mockdate": "^2.0.2",
"prettier": "^1.17.1",
"ts-jest": "^24.0.2",
Expand Down
10 changes: 8 additions & 2 deletions src/chai/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ describe('utils', () => {
jest.clearAllMocks();
});

let arr = [{ pass: true, negate: false }, { pass: false, negate: true }];
let arr = [
{ pass: true, negate: false },
{ pass: false, negate: true },
];
arr.forEach(({ pass, negate }) => {
test(`should retry once on pass === ${pass}, negate === ${negate}`, async () => {
const toWrap = jest.fn();
Expand All @@ -33,7 +36,10 @@ describe('utils', () => {
});
});

arr = [{ pass: false, negate: false }, { pass: true, negate: true }];
arr = [
{ pass: false, negate: false },
{ pass: true, negate: true },
];
arr.forEach(({ pass, negate }) => {
test(`should exhaust timeout on pass === ${pass}, negate === ${negate}`, async () => {
const { sleep } = require('../common');
Expand Down
4 changes: 2 additions & 2 deletions src/jest/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jest.mock('jest-diff');

describe('api matchers', () => {
describe('toReturnResponse', () => {
const matcherUtils = {
const matcherUtils = ({
equals: jest.fn(),
expand: true,
isNot: false,
Expand All @@ -22,7 +22,7 @@ describe('api matchers', () => {
printExpected: jest.fn(i => i),
printReceived: jest.fn(i => i),
},
};
} as unknown) as jest.MatcherUtils & { equals: jest.Mock };
const url = 'url';
const method = 'POST' as Method;
const params = { param1: 'param1' };
Expand Down
4 changes: 2 additions & 2 deletions src/jest/cloudwatch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jest.spyOn(common, 'epochDateMinusHours');

describe('cloudwatch matchers', () => {
describe('toHaveLog', () => {
const matcherUtils = {
const matcherUtils = ({
equals: jest.fn(),
expand: true,
isNot: false,
Expand All @@ -24,7 +24,7 @@ describe('cloudwatch matchers', () => {
printExpected: jest.fn(i => i),
printReceived: jest.fn(i => i),
},
};
} as unknown) as jest.MatcherUtils & { equals: jest.Mock };
const region = 'region';
const functionName = 'functionName';
const startTime = 12 * 60 * 60 * 1000;
Expand Down
4 changes: 2 additions & 2 deletions src/jest/dynamoDb.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jest.mock('jest-diff');

describe('dynamoDb matchers', () => {
describe('toHaveItem', () => {
const matcherUtils = {
const matcherUtils = ({
equals: jest.fn(),
expand: true,
isNot: false,
Expand All @@ -21,7 +21,7 @@ describe('dynamoDb matchers', () => {
printExpected: jest.fn(i => i),
printReceived: jest.fn(i => i),
},
};
} as unknown) as jest.MatcherUtils & { equals: jest.Mock };
const region = 'region';
const table = 'table';
const props = { region, table };
Expand Down
4 changes: 2 additions & 2 deletions src/jest/kinesis.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jest.spyOn(console, 'error');

describe('kinesis matchers', () => {
describe('toHaveRecord', () => {
const matcherUtils = {
const matcherUtils = ({
equals: jest.fn(),
expand: true,
isNot: false,
Expand All @@ -20,7 +20,7 @@ describe('kinesis matchers', () => {
printExpected: jest.fn(i => i),
printReceived: jest.fn(i => i),
},
};
} as unknown) as jest.MatcherUtils & { equals: jest.Mock };
const region = 'region';
const stream = 'stream';
const props = { region, stream };
Expand Down
4 changes: 2 additions & 2 deletions src/jest/s3.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jest.mock('jest-diff');

describe('s3 matchers', () => {
describe('toHaveObject', () => {
const matcherUtils = {
const matcherUtils = ({
equals: jest.fn(),
expand: true,
isNot: false,
Expand All @@ -21,7 +21,7 @@ describe('s3 matchers', () => {
printExpected: jest.fn(i => i),
printReceived: jest.fn(i => i),
},
};
} as unknown) as jest.MatcherUtils & { equals: jest.Mock };
const region = 'region';
const bucket = 'bucket';
const props = { region, bucket };
Expand Down
4 changes: 2 additions & 2 deletions src/jest/sqs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jest.spyOn(console, 'error');

describe('sqs matchers', () => {
describe('toHaveRecord', () => {
const matcherUtils = {
const matcherUtils = ({
equals: jest.fn(),
expand: true,
isNot: false,
Expand All @@ -20,7 +20,7 @@ describe('sqs matchers', () => {
printExpected: jest.fn(i => i),
printReceived: jest.fn(i => i),
},
};
} as unknown) as jest.MatcherUtils & { equals: jest.Mock };
const region = 'region';
const queueUrl = 'queueUrl';
const props = { region, queueUrl };
Expand Down
4 changes: 2 additions & 2 deletions src/jest/stepFunctions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jest.spyOn(console, 'error');
jest.mock('jest-diff');

describe('stepFunctions matchers', () => {
const matcherUtils = {
const matcherUtils = ({
equals: jest.fn(),
expand: true,
isNot: false,
Expand All @@ -20,7 +20,7 @@ describe('stepFunctions matchers', () => {
printExpected: jest.fn(i => i),
printReceived: jest.fn(i => i),
},
};
} as unknown) as jest.MatcherUtils & { equals: jest.Mock };
const region = 'region';
const stateMachineArn = 'stateMachineArn';
const props = { region, stateMachineArn };
Expand Down
10 changes: 8 additions & 2 deletions src/jest/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ describe('utils', () => {
jest.clearAllMocks();
});

let arr = [{ pass: true, isNot: false }, { pass: false, isNot: true }];
let arr = [
{ pass: true, isNot: false },
{ pass: false, isNot: true },
];
arr.forEach(({ pass, isNot }) => {
test(`should retry once on pass === ${pass}, isNot === ${isNot}`, async () => {
const toWrap = jest.fn();
Expand All @@ -32,7 +35,10 @@ describe('utils', () => {
});
});

arr = [{ pass: false, isNot: false }, { pass: true, isNot: true }];
arr = [
{ pass: false, isNot: false },
{ pass: true, isNot: true },
];
arr.forEach(({ pass, isNot }) => {
test(`should exhaust timeout on pass === ${pass}, isNot === ${isNot}`, async () => {
const { sleep } = require('../common');
Expand Down
Loading