describe('[web-components] globals', () => { function itExportsGlobal(globalName: string) { test(`exports "${globalName}"`, () => { jest.isolateModules(() => { const globalValue = 'foo'; Object.assign(global, { [globalName]: globalValue }); const globalsExport = require('../globals')[globalName]; expect(globalsExport).toBe(globalValue); }); }); } ['EXPOSED_DEPENDENCIES', 'EXPOSED_INSTANCE_DEPENDENCIES', 'WEB_COMPONENT_NAME'].forEach(name => itExportsGlobal(name) ); });