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 ↵
my-project@0.31.5
├── jest@29.3.1
└─┬ ts-jest@29.0.3
└── jest@29.3.1 deduped