hardening: isolate third-party paths and clean external-build metadata (#311)
* hardening: isolate third-party paths and clean external-build metadata * fix: restore external feedback flow and make privacy check portable
This commit is contained in:
23
src/components/Feedback.test.ts
Normal file
23
src/components/Feedback.test.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { expect, test } from 'bun:test'
|
||||
|
||||
import { createGitHubIssueUrl } from './Feedback.tsx'
|
||||
|
||||
(globalThis as { MACRO?: { VERSION?: string } }).MACRO = { VERSION: '0.1.7' }
|
||||
|
||||
test('createGitHubIssueUrl omits empty feedback IDs', () => {
|
||||
const url = decodeURIComponent(
|
||||
createGitHubIssueUrl('', 'Bug title', 'Bug description', []),
|
||||
)
|
||||
|
||||
expect(url).not.toContain('Feedback ID:')
|
||||
expect(url).toContain('Bug Description')
|
||||
expect(url).toContain('Errors')
|
||||
})
|
||||
|
||||
test('createGitHubIssueUrl includes feedback IDs when present', () => {
|
||||
const url = decodeURIComponent(
|
||||
createGitHubIssueUrl('fb-123', 'Bug title', 'Bug description', []),
|
||||
)
|
||||
|
||||
expect(url).toContain('Feedback ID: fb-123')
|
||||
})
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user