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
44,012 changes: 19,379 additions & 24,633 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@
"@types/color": "3.0.7",
"@types/contrast-color": "1.0.3",
"@types/is-base64": "1.1.3",
"@types/jest": "29.5.14",
"@types/jest": "30.0.0",
"@types/lodash-es": "4.17.12",
"@types/lodash.debounce": "4.0.9",
"@types/lru-cache": "7.10.10",
Expand Down Expand Up @@ -367,7 +367,7 @@
"@vitest/eslint-plugin": "1.6.27",
"@vitest/ui": "1.6.1",
"autoprefixer": "10.5.0",
"babel-jest": "29.7.0",
"babel-jest": "30.4.1",
Comment thread
ravikiranvm marked this conversation as resolved.
"cd": "0.3.3",
"chromatic": "11.29.0",
"concurrently": "8.2.2",
Expand All @@ -390,9 +390,9 @@
"husky": "9.1.7",
"i18next-cli": "1.64.1",
"inquirer": "8.2.7",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jest-environment-node": "29.7.0",
"jest": "30.4.2",
"jest-environment-jsdom": "30.4.1",
"jest-environment-node": "30.4.1",
"jsonc-eslint-parser": "3.3.0",
"lint-staged": "15.5.2",
"nx-cloud": "19.1.3",
Expand All @@ -405,7 +405,7 @@
"prettier-plugin-organize-imports": "4.3.0",
"storybook": "10.6.0",
"tailwindcss": "3.4.19",
"ts-jest": "29.4.11",
"ts-jest": "29.4.12",
"ts-node": "10.9.2",
"typescript": "5.5.4",
"typescript-eslint": "8.66.0",
Expand Down
16 changes: 8 additions & 8 deletions packages/blocks/anodot/test/common/recommendations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('getAnodotRecommendations', () => {
);

expect(result).toEqual(['some info']);
expect(makeHttpRequestMock).toBeCalledTimes(1);
expect(makeHttpRequestMock).toHaveBeenCalledTimes(1);
expect(makeHttpRequestMock).toHaveBeenCalledWith(
'POST',
'apiUrl/v2/recommendations/list',
Expand All @@ -54,7 +54,7 @@ describe('getAnodotRecommendations', () => {
sort: [{ by: 'savings', order: 'desc' }],
},
);
expect(createAnodotAuthHeadersMock).toBeCalledTimes(1);
expect(createAnodotAuthHeadersMock).toHaveBeenCalledTimes(1);
expect(createAnodotAuthHeadersMock).toHaveBeenCalledWith(
'authToken',
'accountApiKey',
Expand All @@ -71,7 +71,7 @@ describe('getAnodotRecommendations', () => {
).rejects.toThrow('some error');

expect(makeHttpRequestMock).not.toHaveBeenCalled();
expect(createAnodotAuthHeadersMock).toBeCalledTimes(1);
expect(createAnodotAuthHeadersMock).toHaveBeenCalledTimes(1);
expect(createAnodotAuthHeadersMock).toHaveBeenCalledWith(
'authToken',
'accountApiKey',
Expand Down Expand Up @@ -109,7 +109,7 @@ describe('getAnodotRecommendations', () => {
'some recommendation 3',
'some recommendation 4',
]);
expect(makeHttpRequestMock).toBeCalledTimes(3);
expect(makeHttpRequestMock).toHaveBeenCalledTimes(3);
expect(makeHttpRequestMock).toHaveBeenNthCalledWith(
1,
'POST',
Expand Down Expand Up @@ -145,7 +145,7 @@ describe('getAnodotRecommendations', () => {
sort: [{ by: 'savings', order: 'desc' }],
},
);
expect(createAnodotAuthHeadersMock).toBeCalledTimes(1);
expect(createAnodotAuthHeadersMock).toHaveBeenCalledTimes(1);
expect(createAnodotAuthHeadersMock).toHaveBeenCalledWith(
'authToken',
'accountApiKey',
Expand Down Expand Up @@ -177,7 +177,7 @@ describe('setUserStatusForRecommendation', () => {
);

expect(result).toEqual('mock result');
expect(makeHttpRequestMock).toBeCalledTimes(1);
expect(makeHttpRequestMock).toHaveBeenCalledTimes(1);
expect(makeHttpRequestMock).toHaveBeenCalledWith(
'POST',
'apiUrl/v2/recommendations/user-action',
Expand All @@ -193,7 +193,7 @@ describe('setUserStatusForRecommendation', () => {
},
},
);
expect(createAnodotAuthHeadersMock).toBeCalledTimes(1);
expect(createAnodotAuthHeadersMock).toHaveBeenCalledTimes(1);
expect(createAnodotAuthHeadersMock).toHaveBeenCalledWith(
'authToken',
'accountApiKey',
Expand All @@ -217,7 +217,7 @@ describe('setUserStatusForRecommendation', () => {
).rejects.toThrow('some error');

expect(makeHttpRequestMock).not.toHaveBeenCalled();
expect(createAnodotAuthHeadersMock).toBeCalledTimes(1);
expect(createAnodotAuthHeadersMock).toHaveBeenCalledTimes(1);
expect(createAnodotAuthHeadersMock).toHaveBeenCalledWith(
'authToken',
'accountApiKey',
Expand Down
2 changes: 1 addition & 1 deletion packages/openops/test/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,6 @@ describe('getRoleForAccount tests', () => {
},
'4',
),
).toThrowError('Role not found for account');
).toThrow('Role not found for account');
});
});
16 changes: 8 additions & 8 deletions packages/openops/test/aws/ebs/create-ebs-snapshot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('createSnapshot tests', () => {

expect(result).toEqual({ SnapshotId: 'volumeId1', State: 'completed' });
expect(waitForMock.waitForConditionWithTimeout).toHaveBeenCalledTimes(1);
expect(waitForMock.waitForConditionWithTimeout).toBeCalledWith(
expect(waitForMock.waitForConditionWithTimeout).toHaveBeenCalledWith(
expect.any(Function),
300,
2000,
Expand All @@ -80,7 +80,7 @@ describe('createSnapshot tests', () => {
SnapshotIds: ['volumeId1'],
DryRun: false,
});
expect(getAwsClientMock.getAwsClient).toBeCalledTimes(1);
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(1);
});

test('should throw if wait for timeout throws', async () => {
Expand Down Expand Up @@ -114,7 +114,7 @@ describe('createSnapshot tests', () => {
dryRun: false,
}),
).rejects.toThrow('Snapshot creation timed out');
expect(getAwsClientMock.getAwsClient).toBeCalledTimes(1);
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(1);
});

test('should throw when snapshot creation status is error', async () => {
Expand All @@ -129,8 +129,8 @@ describe('createSnapshot tests', () => {
dryRun: false,
}),
).rejects.toThrow('Snapshot creation failed with error: mock Error');
expect(getAwsClientMock.getAwsClient).toBeCalledTimes(1);
expect(waitForMock.waitForConditionWithTimeout).not.toBeCalled();
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(1);
expect(waitForMock.waitForConditionWithTimeout).not.toHaveBeenCalled();
});

test('should throw when describe Snapshot returns with error state', async () => {
Expand Down Expand Up @@ -164,7 +164,7 @@ describe('createSnapshot tests', () => {
SnapshotIds: ['volumeId1'],
DryRun: true,
});
expect(getAwsClientMock.getAwsClient).toBeCalledTimes(1);
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(1);
});

test('should not wait for if no number is provided', async () => {
Expand All @@ -187,7 +187,7 @@ describe('createSnapshot tests', () => {
})) as any;
expect(result).toStrictEqual({ SnapshotId: 'volumeId1' });
expect(describeSnapshotMock).not.toHaveBeenCalled();
expect(waitForMock.waitForConditionWithTimeout).not.toBeCalled();
expect(getAwsClientMock.getAwsClient).toBeCalledTimes(1);
expect(waitForMock.waitForConditionWithTimeout).not.toHaveBeenCalled();
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(1);
});
});
12 changes: 6 additions & 6 deletions packages/openops/test/aws/ebs/delete-ebs-snapshot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('deleteSnapshot tests', () => {
message: 'Snapshot deleted',
});
expect(waitForMock.waitForConditionWithTimeout).toHaveBeenCalledTimes(1);
expect(waitForMock.waitForConditionWithTimeout).toBeCalledWith(
expect(waitForMock.waitForConditionWithTimeout).toHaveBeenCalledWith(
expect.any(Function),
300,
2000,
Expand All @@ -81,7 +81,7 @@ describe('deleteSnapshot tests', () => {
SnapshotIds: ['volumeId1'],
DryRun: false,
});
expect(getAwsClientMock.getAwsClient).toBeCalledTimes(1);
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(1);
});

test('should throw if wait for timeout throws', async () => {
Expand Down Expand Up @@ -116,7 +116,7 @@ describe('deleteSnapshot tests', () => {
await expect(
deleteEbsSnapshot(credentials, 'region1', 'volumeId1', false, 10),
).rejects.toThrow('Snapshot deletion timed out');
expect(getAwsClientMock.getAwsClient).toBeCalledTimes(1);
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(1);
});

test('should throw when describe Snapshot returns with error state', async () => {
Expand Down Expand Up @@ -151,7 +151,7 @@ describe('deleteSnapshot tests', () => {
SnapshotIds: ['volumeId1'],
DryRun: true,
});
expect(getAwsClientMock.getAwsClient).toBeCalledTimes(1);
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(1);
});

test('should not wait for if no number is provided', async () => {
Expand Down Expand Up @@ -184,7 +184,7 @@ describe('deleteSnapshot tests', () => {
snapshotId: 'volumeId1',
});
expect(describeSnapshotMock).not.toHaveBeenCalled();
expect(waitForMock.waitForConditionWithTimeout).not.toBeCalled();
expect(getAwsClientMock.getAwsClient).toBeCalledTimes(1);
expect(waitForMock.waitForConditionWithTimeout).not.toHaveBeenCalled();
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(1);
});
});
6 changes: 3 additions & 3 deletions packages/openops/test/aws/ebs/delete-ebs-volume.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ describe('delete ebs volume tests', () => {
);
expect(result).toEqual({});

expect(getAwsClientMock.getAwsClient).toBeCalledTimes(1);
expect(deleteVolumeMock).toBeCalledWith(
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(1);
expect(deleteVolumeMock).toHaveBeenCalledWith(
expect.objectContaining({ DryRun: false, VolumeId: 'volume1' }),
);
});
Expand All @@ -46,7 +46,7 @@ describe('delete ebs volume tests', () => {

await deleteEbsVolume(credentials, 'region1', 'volume1', dryRun);

expect(deleteVolumeMock).toBeCalledWith(
expect(deleteVolumeMock).toHaveBeenCalledWith(
expect.objectContaining({ DryRun: dryRun, VolumeId: 'volume1' }),
);
},
Expand Down
6 changes: 3 additions & 3 deletions packages/openops/test/aws/ebs/ebs-get-snapshots.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ describe('getEbsSnapshots', () => {
filters,
);

expect(getAwsClientMock.getAwsClient).toBeCalledTimes(2);
expect(getAwsClientMock.getAwsClient).toBeCalledWith(
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(2);
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledWith(
EC2.EC2,
CREDENTIALS,
'some-region1',
);
expect(getAwsClientMock.getAwsClient).toBeCalledWith(
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledWith(
EC2.EC2,
CREDENTIALS,
'some-region2',
Expand Down
10 changes: 5 additions & 5 deletions packages/openops/test/aws/ebs/ebs-get-volumes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ describe('getEbsVolumes', () => {
filters,
);

expect(getAwsClientMock.getAwsClient).toBeCalledTimes(2);
expect(getAwsClientMock.getAwsClient).toBeCalledWith(
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(2);
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledWith(
EC2.EC2,
CREDENTIALS,
'some-region1',
);
expect(getAwsClientMock.getAwsClient).toBeCalledWith(
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledWith(
EC2.EC2,
CREDENTIALS,
'some-region2',
Expand Down Expand Up @@ -130,8 +130,8 @@ describe('getEbsVolumes', () => {
filters,
);

expect(getAwsClientMock.getAwsClient).toBeCalledTimes(1);
expect(getAwsClientMock.getAwsClient).toBeCalledWith(
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(1);
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledWith(
EC2.EC2,
CREDENTIALS,
'some-region1',
Expand Down
6 changes: 3 additions & 3 deletions packages/openops/test/aws/ec2/ec2-get-instances.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ describe('getEc2Instances', () => {
false,
filters,
);
expect(getAwsClientMock.getAwsClient).toBeCalledTimes(2);
expect(getAwsClientMock.getAwsClient).toBeCalledWith(
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(2);
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledWith(
EC2.EC2,
CREDENTIALS,
'some-region1',
);
expect(getAwsClientMock.getAwsClient).toBeCalledWith(
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledWith(
EC2.EC2,
CREDENTIALS,
'some-region2',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('ec2-instance-state-manager', () => {
stopInstance('some creds', 'instance-id', 'region', false, undefined),
).rejects.toThrow('some error');

expect(waitForMock.waitForConditionWithTimeout).not.toBeCalled();
expect(waitForMock.waitForConditionWithTimeout).not.toHaveBeenCalled();
});

test('should wait for instance state change if wait for is set', async () => {
Expand All @@ -102,7 +102,7 @@ describe('ec2-instance-state-manager', () => {
await stopInstance('some creds', 'instance-id', 'region', false, 10);

expect(waitForMock.waitForConditionWithTimeout).toHaveBeenCalledTimes(1);
expect(waitForMock.waitForConditionWithTimeout).toBeCalledWith(
expect(waitForMock.waitForConditionWithTimeout).toHaveBeenCalledWith(
expect.any(Function),
300,
10,
Expand Down Expand Up @@ -169,7 +169,7 @@ describe('ec2-instance-state-manager', () => {
startInstance('some creds', 'instance-id', 'region', false, undefined),
).rejects.toThrow('some error');

expect(waitForMock.waitForConditionWithTimeout).not.toBeCalled();
expect(waitForMock.waitForConditionWithTimeout).not.toHaveBeenCalled();
});

test('should wait for instance state change if wait for is set', async () => {
Expand All @@ -183,7 +183,7 @@ describe('ec2-instance-state-manager', () => {
await startInstance('some creds', 'instance-id', 'region', false, 10);

expect(waitForMock.waitForConditionWithTimeout).toHaveBeenCalledTimes(1);
expect(waitForMock.waitForConditionWithTimeout).toBeCalledWith(
expect(waitForMock.waitForConditionWithTimeout).toHaveBeenCalledWith(
expect.any(Function),
300,
10,
Expand Down
8 changes: 4 additions & 4 deletions packages/openops/test/aws/ec2/ec2-terminate-instances.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ describe('deleteInstances', () => {
false,
);

expect(getAwsClientMock.getAwsClient).toBeCalledTimes(1);
expect(getAwsClientMock.getAwsClient).toBeCalledWith(
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(1);
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledWith(
EC2.EC2,
credentials,
'some-region1',
Expand All @@ -60,8 +60,8 @@ describe('deleteInstances', () => {
true,
),
).rejects.toThrow('some error');
expect(getAwsClientMock.getAwsClient).toBeCalledTimes(1);
expect(getAwsClientMock.getAwsClient).toBeCalledWith(
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledTimes(1);
expect(getAwsClientMock.getAwsClient).toHaveBeenCalledWith(
EC2.EC2,
credentials,
'some-region1',
Expand Down
Loading
Loading