test: remove low-value renderer main shared and script suites (#42548)

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
OrcaWin
2026-11-14 16:35:55 -08:00
committed by GitHub
co-authored by OrcaWin
parent 552c71ef10
commit 9ef747cfc1
46 changed files with 0 additions and 1689 deletions
@@ -1,26 +0,0 @@
import { describe, expect, it } from 'vitest'
import { githubBodyImageUrls } from './body-image-urls'
const original = 'https://github.com/user-attachments/assets/ce11040a-fb66-4289-927f-547b16dfc488'
const signed =
'https://private-user-images.githubusercontent.com/1/2-ce11040a-fb66-4289-927f-547b16dfc488.png?jwt=TEST&download=1'
describe('GitHub body image sources', () => {
it('matches rendered images to canonical assets without changing editable Markdown', () => {
const body = `![shot](${original})\n<img src="https://github.enterprise/team/repo/assets/42/ab11040a-fb66-4289-927f-547b16dfc488">\n![missing](https://github.com/user-attachments/assets/cc11040a-fb66-4289-927f-547b16dfc488)\n\`https://github.com/user-attachments/assets/dd11040a-fb66-4289-927f-547b16dfc488\``
const html = `<img src="https://private-user-images.githubusercontent.com/1/2-ce11040a-fb66-4289-927f-547b16dfc488.png?jwt=TEST&amp;download=1"><img src="https://github.enterprise/storage/ab11040a-fb66-4289-927f-547b16dfc488.png?jwt=TEST"><code>https://private-user-images.githubusercontent.com/1/dd11040a-fb66-4289-927f-547b16dfc488.png</code>`
expect(githubBodyImageUrls(body, html)).toEqual({
'https://github.com/user-attachments/assets/ce11040a-fb66-4289-927f-547b16dfc488': signed,
'https://github.enterprise/team/repo/assets/42/ab11040a-fb66-4289-927f-547b16dfc488':
'https://github.enterprise/storage/ab11040a-fb66-4289-927f-547b16dfc488.png?jwt=TEST'
})
expect(githubBodyImageUrls(body, undefined)).toBeUndefined()
expect(githubBodyImageUrls(`![public](${original})`, `<img src="${original}">`)).toBeUndefined()
expect(
githubBodyImageUrls(
body,
'<img src="https://unrelated.example/ce11040a-fb66-4289-927f-547b16dfc488.png">'
)
).toBeUndefined()
})
})
@@ -1,27 +0,0 @@
import { expect, it, vi } from 'vitest'
import { api, capture } from '../../work-items/work-item-search-test-harness'
import { listWorkItems } from './list-work-items'
import './count-work-items'
import metadata from '../../__fixtures__/work-item-search-metadata.json'
it('hydrates oversized associations with the preferred page credential', async () => {
vi.stubEnv('GH_TOKEN', 'fixture-original-credential')
const row = structuredClone(metadata[0].graphql)
api.specialNodes = [{ ...row, labels: { ...row.labels, pageInfo: { hasNextPage: true } } }]
capture.mockImplementation(async (binary, args, options) => {
if (args.includes('graphql')) {
vi.stubEnv('GH_TOKEN', 'fixture-later-credential')
}
return api.capture(binary, args, options)
})
const result = await listWorkItems('fixture/repo', 24, 'is:issue')
expect(result.items[0].labels).toHaveLength(125)
const queries = api.calls.filter(
(call) =>
call.args.includes('graphql') || call.args.some((arg) => /^repos\/.+\/issues\/\d+$/.test(arg))
)
expect(queries.map((call) => call.fixtureCredential)).toEqual([
'fixture-original-credential',
'fixture-original-credential'
])
})