Just checking that we're exporting an object is failing as follows:
import * as Foo from './foo';
describe('Foo', () => {
test('should export an object', () => {
expect(Foo).toBeInstanceOf(Object);
});
});
getting this error:
While I can workaround using typeof
:
import * as Foo from './foo';
describe('Foo', () => {
test('should export an object', () => {
- expect(Foo).toBeInstanceOf(Object);
+ expect(typeof LivingAppsCoreReact).toEqual('object');
});
});
I'd like to understand why Jest defines that Object
constructor isn't... Object
constructor.
Checked that the object is exporting the actual keys ✅
Env:
$» npm ls jest 1 ↵
[email protected]
├── [email protected]
└─┬ [email protected]
└── [email protected] deduped