fde488ac82
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.
18 lines
487 B
TypeScript
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);
|
|
});
|
|
});
|