Skip to content

Commit

Permalink
tests: fix ccf error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
narekhovhannisyan committed Nov 23, 2023
1 parent 5e95179 commit 0299646
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/__tests__/unit/lib/ccf/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ describe('ccf:configure test', () => {
try {
outputModel.resolveAwsArchitecture('Gra2');
} catch (e: any) {
expect(e.message).toBe('Gra2 not supported');
expect(e.message).toBe(
"CloudCarbonFootprint: Architecture 'Gra2' is not supported."
);
}
await outputModel.configure({
vendor: 'aws',
Expand Down Expand Up @@ -56,9 +58,8 @@ describe('ccf:configure test', () => {
energy: 0.004900000000000001,
},
]);
await expect(outputModel.execute(undefined)).rejects.toThrowError();
await expect(outputModel.execute({})).rejects.toThrowError();
});

test('initialize with params:aws', async () => {
const outputModel = new CloudCarbonFootprint();
await outputModel.configure({
Expand Down

0 comments on commit 0299646

Please sign in to comment.