Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ local.log

**/*.gen.ts

.env
.env
23 changes: 23 additions & 0 deletions lib/index.umd.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { expect, describe, it } from 'vitest';

import * as optimizely from './index.browser';

type OptimizelySdk = typeof optimizely;

declare global {
interface Window {
optimizelySdk: OptimizelySdk;
}
}

describe('UMD Bundle', () => {
// these are just intial tests to check the UMD bundle is loaded correctly
// we will add more comprehensive umd tests later
it('should have optimizelySdk on the window object', () => {
expect(window.optimizelySdk).toBeDefined();
});

it('should export createInstance function', () => {
expect(typeof window.optimizelySdk.createInstance).toBe('function');
});
});
Loading
Loading