Jest: how to test for object keys and values?

I have a mapModule where I import components and export them:

import ComponentName from '../components/ComponentName';

export default {
  name: ComponentName,
};

How can I test that mapModule has the correct exported keys, values and that they are not null or undefined?

6 Answers
6

Leave a Comment