Skip to content

Commit

Permalink
Merge pull request #41 from antisedativ/CLT-45
Browse files Browse the repository at this point in the history
CLT-45
  • Loading branch information
antisedativ committed Mar 21, 2024
2 parents dfcfba2 + 6f6ff7e commit 85ccac0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as charm_moduls from '@src/index.js';
describe('function calls in index.js', () => {
test('all functions are called correctly', () => {
const keys = Object.keys(charm_moduls);
keys.forEach(key => {
const func = charm_moduls[key];
if (typeof func === 'function') {
const spy = jest.fn();
try {
spy();
} catch (error) {
console.error(`Error calling function ${key}:`, error);
}
expect(spy).toHaveBeenCalled();
}
});
});
});

0 comments on commit 85ccac0

Please sign in to comment.