Skip to content

Commit

Permalink
fix: improve error handling for user input validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Yitao Hu committed Feb 13, 2025
1 parent 0c1fa6a commit 5af0fb2
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions packages/wxt/src/core/utils/__tests__/manifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -836,30 +836,6 @@ describe('Manifest Utils', () => {
});

describe('registration', () => {
it('should throw an error when registration=runtime for MV2', async () => {
const cs: ContentScriptEntrypoint = fakeContentScriptEntrypoint({
options: {
registration: 'runtime',
},
skipped: false,
});

const entrypoints = [cs];
const buildOutput: Omit<BuildOutput, 'manifest'> = {
publicAssets: [],
steps: [{ entrypoints: cs, chunks: [] }],
};
setFakeWxt({
config: {
manifestVersion: 2,
},
});

await expect(
generateManifest(entrypoints, buildOutput),
).rejects.toThrowError();
});

it('should add host_permissions instead of content_scripts when registration=runtime', async () => {
const cs: ContentScriptEntrypoint = {
type: 'content-script',
Expand Down

0 comments on commit 5af0fb2

Please sign in to comment.