Files
wxt/src/sandbox/__tests__/define-content-script.test.ts
T
Aaron fde488ac82 feat!: Add support for "main world" content scripts (#284)
BREAKING CHANGE: `defineContentScript` and `defineBackground` are now exported from `wxt/sandbox` instead of `wxt/client`. If you use auto-imports, no changes are required. If you have disabled auto-imports, you'll need to manually update your import statements.
2023-12-13 15:41:39 -06:00

18 lines
487 B
TypeScript

import { describe, expect, it, vi } from 'vitest';
import { defineContentScript } from '~/sandbox/define-content-script';
import { ContentScriptDefinition } from '~/types';
describe('defineContentScript', () => {
it('should return the object passed in', () => {
const definition: ContentScriptDefinition = {
matches: [],
include: [''],
main: vi.fn(),
};
const actual = defineContentScript(definition);
expect(actual).toEqual(definition);
});
});