blob: 6651308f31a3f6f84b0111e5a10215172fc84a3e [file] [log] [blame]
const someGlobal = new Promise<string>((resolve, reject) => {
const script = document.createElement('script');
script.src = `base/npm_bazel_typescript/examples/testing/static_script.js`;
script.onerror = reject;
script.onload = () => {
document.body.removeChild(script);
resolve((window as any).someGlobal);
};
document.body.appendChild(script);
});
describe('static script', () => {
it('should load', async () => {
expect(await someGlobal).toBe("someGlobalValue");
});
});
// at least one import or export is needed for this file to
// be compiled into an named-UMD module by typescript
export {};