feat(short-drama-agent-front): 接入空间母版恢复与修订
This commit is contained in:
1 parent
c808a58a3f
commit
7e149a10c0
18 files changed
+2732
-12
No files matched your search
@@ -0,0 +1,230 @@
|
||||
import { effectScope, reactive } from 'vue'
|
||||
import { flushPromises } from '@vue/test-utils'
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import { useMasterGeneration } from '@/features/spatial-layouts/useMasterGeneration'
|
||||
import { createMasterMock, spatialLayoutFixture } from '../../fixtures/spatial-masters'
|
||||
|
||||
/** 每个测试使用独立作用域与费用标记,不连接任何 Provider。 */
|
||||
let scope = effectScope()
|
||||
afterEach(() => {
|
||||
scope.stop()
|
||||
scope = effectScope()
|
||||
sessionStorage.clear()
|
||||
vi.unstubAllGlobals()
|
||||
})
|
||||
describe('母版输入来源与重复付费保护', () => {
|
||||
it('明确 Draft 修订后绑定同次指纹;输入改变撤销费用勾选,成功只生成一次草稿', async () => {
|
||||
const mock = createMasterMock()
|
||||
vi.stubGlobal('fetch', mock.fetcher)
|
||||
const generated = vi.fn<() => void>()
|
||||
const props = reactive({
|
||||
projectId: 'p',
|
||||
layout: { ...spatialLayoutFixture },
|
||||
masters: mock.state.masters,
|
||||
disabled: false
|
||||
})
|
||||
const form = scope.run(() => useMasterGeneration(props, generated, () => {}))!
|
||||
await flushPromises()
|
||||
expect(mock.calls.every(call => call.method === 'GET')).toBe(true)
|
||||
form.revisionMode.value = true
|
||||
form.referenceId.value = 'draft'
|
||||
form.instruction.value = '只调整转轴方向'
|
||||
await form.loadPreview()
|
||||
expect(form.preview.value?.preflight.referenceMasterId).toBe('draft')
|
||||
form.acknowledged.value = true
|
||||
form.instruction.value = '只调整门扇方向'
|
||||
await flushPromises()
|
||||
expect(form.preview.value).toBeNull()
|
||||
expect(form.acknowledged.value).toBe(false)
|
||||
await form.loadPreview()
|
||||
form.acknowledged.value = true
|
||||
await Promise.all([form.submit(), form.submit()])
|
||||
const writes = mock.calls.filter(call => call.url.endsWith('/generate'))
|
||||
expect(writes).toHaveLength(1)
|
||||
expect(writes[0]!.body).toMatchObject({
|
||||
referenceMasterId: 'draft',
|
||||
revisionInstruction: '只调整门扇方向',
|
||||
expectedPreviewFingerprint: 'f'.repeat(64),
|
||||
confirmPaidGeneration: true,
|
||||
expectedVersion: spatialLayoutFixture.version
|
||||
})
|
||||
expect(generated).toHaveBeenCalledTimes(1)
|
||||
expect(mock.calls.some(call => call.url.endsWith('/validate') || call.url.endsWith('/confirm'))).toBe(false)
|
||||
})
|
||||
it('费用前 409 且任务未创建可重新免费预检;费用后冲突存在新任务则持续阻断', async () => {
|
||||
const mock = createMasterMock()
|
||||
vi.stubGlobal('fetch', mock.fetcher)
|
||||
const props = reactive({
|
||||
projectId: 'p',
|
||||
layout: { ...spatialLayoutFixture },
|
||||
masters: mock.state.masters,
|
||||
disabled: false
|
||||
})
|
||||
const form = scope.run(() =>
|
||||
useMasterGeneration(
|
||||
props,
|
||||
() => {},
|
||||
() => {}
|
||||
)
|
||||
)!
|
||||
await flushPromises()
|
||||
form.referenceId.value = 'old'
|
||||
await form.loadPreview()
|
||||
form.acknowledged.value = true
|
||||
mock.state.generationConflict = true
|
||||
await form.submit()
|
||||
expect(form.recoveryNotice.value).toBe('')
|
||||
expect(form.preview.value).toBeNull()
|
||||
mock.state.generationConflict = false
|
||||
mock.state.afterPaidConflict = true
|
||||
await form.loadPreview()
|
||||
form.acknowledged.value = true
|
||||
await form.submit()
|
||||
expect(form.recoveryNotice.value).toContain('费用待核对')
|
||||
form.instruction.value = '修改也不能绕过费用保护'
|
||||
await form.loadPreview()
|
||||
form.acknowledged.value = true
|
||||
await form.submit()
|
||||
expect(mock.calls.filter(call => call.url.endsWith('/generate'))).toHaveLength(2)
|
||||
})
|
||||
it('付费阶段的 400 不能当成未收费,必须按新任务证据保持阻断', async () => {
|
||||
const mock = createMasterMock()
|
||||
mock.state.afterPaidConflict = true
|
||||
mock.state.generationErrorStatus = 400
|
||||
vi.stubGlobal('fetch', mock.fetcher)
|
||||
const props = reactive({
|
||||
projectId: 'p',
|
||||
layout: { ...spatialLayoutFixture },
|
||||
masters: mock.state.masters,
|
||||
disabled: false
|
||||
})
|
||||
const form = scope.run(() =>
|
||||
useMasterGeneration(
|
||||
props,
|
||||
() => {},
|
||||
() => {}
|
||||
)
|
||||
)!
|
||||
await flushPromises()
|
||||
form.referenceId.value = 'old'
|
||||
await form.loadPreview()
|
||||
form.acknowledged.value = true
|
||||
await form.submit()
|
||||
expect(form.recoveryNotice.value).toContain('费用待核对')
|
||||
await form.loadPreview()
|
||||
form.acknowledged.value = true
|
||||
await form.submit()
|
||||
expect(mock.calls.filter(call => call.url.endsWith('/generate'))).toHaveLength(1)
|
||||
})
|
||||
it('200 畸形回执不当作成功,保留未知费用且不自动重发', async () => {
|
||||
const mock = createMasterMock()
|
||||
const fetcher = vi.fn<typeof fetch>(async (input, init) =>
|
||||
String(input).endsWith('/generate')
|
||||
? new Response(JSON.stringify({ data: null }))
|
||||
: mock.fetcher(input, init)
|
||||
)
|
||||
vi.stubGlobal('fetch', fetcher)
|
||||
const props = reactive({
|
||||
projectId: 'p',
|
||||
layout: { ...spatialLayoutFixture },
|
||||
masters: mock.state.masters,
|
||||
disabled: false
|
||||
})
|
||||
const generated = vi.fn<() => void>()
|
||||
const form = scope.run(() => useMasterGeneration(props, generated, () => {}))!
|
||||
await flushPromises()
|
||||
form.referenceId.value = 'old'
|
||||
await form.loadPreview()
|
||||
form.acknowledged.value = true
|
||||
await form.submit()
|
||||
expect(form.recoveryNotice.value).toContain('费用待核对')
|
||||
expect(generated).not.toHaveBeenCalled()
|
||||
await form.submit()
|
||||
expect(fetcher.mock.calls.filter(([input]) => String(input).endsWith('/generate'))).toHaveLength(1)
|
||||
})
|
||||
it('连接中断保持费用保护;关闭并刷新观察器不自动重发', async () => {
|
||||
const mock = createMasterMock()
|
||||
vi.stubGlobal(
|
||||
'fetch',
|
||||
vi.fn<typeof fetch>(async (input, init) => {
|
||||
if (String(input).endsWith('/generate')) throw new TypeError('网络中断')
|
||||
return mock.fetcher(input, init)
|
||||
})
|
||||
)
|
||||
const props = reactive({
|
||||
projectId: 'p',
|
||||
layout: { ...spatialLayoutFixture },
|
||||
masters: mock.state.masters,
|
||||
disabled: false
|
||||
})
|
||||
const form = scope.run(() =>
|
||||
useMasterGeneration(
|
||||
props,
|
||||
() => {},
|
||||
() => {}
|
||||
)
|
||||
)!
|
||||
await flushPromises()
|
||||
form.referenceId.value = 'old'
|
||||
await form.loadPreview()
|
||||
form.acknowledged.value = true
|
||||
await form.submit()
|
||||
expect(form.recoveryNotice.value).toContain('费用待核对')
|
||||
scope.stop()
|
||||
scope = effectScope()
|
||||
const restored = scope.run(() =>
|
||||
useMasterGeneration(
|
||||
props,
|
||||
() => {},
|
||||
() => {}
|
||||
)
|
||||
)!
|
||||
await flushPromises()
|
||||
expect(restored.recoveryNotice.value).toContain('费用待核对')
|
||||
expect(restored.canSubmit.value).toBe(false)
|
||||
})
|
||||
it('切项目和同项目切布局都清除旧参考与预检,迟到响应不回填', async () => {
|
||||
const mock = createMasterMock()
|
||||
let resolveOld!: (response: Response) => void
|
||||
vi.stubGlobal(
|
||||
'fetch',
|
||||
vi.fn<typeof fetch>(async (input, init) =>
|
||||
String(input).endsWith('/generation-preflight')
|
||||
? new Promise(resolve => {
|
||||
resolveOld = resolve
|
||||
})
|
||||
: mock.fetcher(input, init)
|
||||
)
|
||||
)
|
||||
const props = reactive({
|
||||
projectId: 'p',
|
||||
layout: { ...spatialLayoutFixture },
|
||||
masters: mock.state.masters,
|
||||
disabled: false
|
||||
})
|
||||
const form = scope.run(() =>
|
||||
useMasterGeneration(
|
||||
props,
|
||||
() => {},
|
||||
() => {}
|
||||
)
|
||||
)!
|
||||
await flushPromises()
|
||||
form.referenceId.value = 'old'
|
||||
const loading = form.loadPreview()
|
||||
await flushPromises()
|
||||
props.projectId = 'p2'
|
||||
props.layout = { ...spatialLayoutFixture, id: 'layout2', projectId: 'p2' }
|
||||
await flushPromises()
|
||||
resolveOld(
|
||||
new Response(JSON.stringify({ data: { layoutId: 'layout', layoutVersion: spatialLayoutFixture.version } }))
|
||||
)
|
||||
await loading
|
||||
expect(form.preview.value).toBeNull()
|
||||
expect(form.referenceId.value).toBe('')
|
||||
expect(form.provider.value).toBe('mock')
|
||||
props.layout = { ...props.layout, id: 'layout3' }
|
||||
await flushPromises()
|
||||
expect(form.provider.value).toBe('mock')
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,108 @@
|
||||
import { mount, flushPromises, type VueWrapper } from '@vue/test-utils'
|
||||
import { NCheckbox, NInput, NSelect, NTabs } from 'naive-ui'
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import SceneMasterManager from '@/features/spatial-layouts/components/SceneMasterManager.vue'
|
||||
import { createMasterMock } from '../../fixtures/spatial-masters'
|
||||
|
||||
/** 固定栏与长内容在 Chrome 验收,组件层使用实际表单和正式接口 Mock。 */
|
||||
let wrapper: VueWrapper
|
||||
/**
|
||||
* 点击可见业务按钮,保留实际提交门禁。
|
||||
* @param label 完整按钮名称
|
||||
*/
|
||||
async function click(label: string) {
|
||||
const button = wrapper.findAll('button').find(item => item.text() === label)
|
||||
expect(button).toBeDefined()
|
||||
await button!.trigger('click')
|
||||
await flushPromises()
|
||||
}
|
||||
/**
|
||||
* 创建隔离管理页,不把初始读取变成审核或生成。
|
||||
* @returns 请求 Mock 状态
|
||||
*/
|
||||
async function setup() {
|
||||
const mock = createMasterMock()
|
||||
vi.stubGlobal('fetch', mock.fetcher)
|
||||
wrapper = mount(SceneMasterManager, {
|
||||
props: { open: true, projectId: 'p', layoutId: 'layout' },
|
||||
global: { stubs: { AppDrawer: { template: '<div><slot/><slot name="footer"/></div>' }, AssetImage: true } }
|
||||
})
|
||||
await flushPromises()
|
||||
return mock
|
||||
}
|
||||
afterEach(() => {
|
||||
wrapper?.unmount()
|
||||
sessionStorage.clear()
|
||||
vi.unstubAllGlobals()
|
||||
})
|
||||
describe('F04 空间母版管理增量流程', () => {
|
||||
it('打开不调用 Provider,确认历史不冒充当前母版,预检没有报价不伪造金额', async () => {
|
||||
const mock = await setup()
|
||||
expect(wrapper.text()).toContain('暂无当前版本已确认母版')
|
||||
expect(wrapper.text()).toContain('机器:AI 视觉审核未通过或未运行')
|
||||
expect(mock.calls.every(call => call.method === 'GET')).toBe(true)
|
||||
expect(wrapper.findAll('.n-form-item--error')).toHaveLength(0)
|
||||
wrapper.findComponent(NTabs).vm.$emit('update:value', 'generate')
|
||||
await flushPromises()
|
||||
await click('免费预检母版输入')
|
||||
expect(wrapper.text()).toContain('预检接口未提供报价')
|
||||
expect(wrapper.text()).not.toContain('¥0.60')
|
||||
expect(mock.calls.filter(call => call.url.endsWith('/generate'))).toHaveLength(0)
|
||||
})
|
||||
it('人工逐项确认使用真实身份和版本,独立保存 Human Passed,不自动 Vision', async () => {
|
||||
const mock = await setup()
|
||||
const select = wrapper
|
||||
.findAllComponents(NSelect)
|
||||
.find(item => item.attributes('aria-label') === '第 1 项人工结论')!
|
||||
select.vm.$emit('update:value', 'passed')
|
||||
for (const input of wrapper.findAllComponents(NInput)) {
|
||||
const placeholder = input.props('placeholder')
|
||||
input.vm.$emit('update:value', placeholder === '填写真实确认人' ? 'goujun' : '清晰可见固定连接位置')
|
||||
}
|
||||
await flushPromises()
|
||||
await click('正式人工确认母版')
|
||||
expect(mock.calls.filter(call => call.url.endsWith('/confirm'))).toHaveLength(1)
|
||||
expect(mock.calls.filter(call => call.url.endsWith('/validate'))).toHaveLength(0)
|
||||
expect(wrapper.text()).toContain('人工:人工审核通过')
|
||||
expect(wrapper.text()).toContain('机器:AI 视觉审核未通过或未运行')
|
||||
const body = mock.calls.find(call => call.url.endsWith('/confirm'))!.body
|
||||
expect(body.confirmedBy).toBe('goujun')
|
||||
expect(body.reviewResults).toEqual([{ index: 1, result: 'passed', evidence: '清晰可见固定连接位置' }])
|
||||
})
|
||||
it('AI 通过仍为 Draft,不自动填人工通过或确认;必须独立勾选费用', async () => {
|
||||
const mock = await setup()
|
||||
const button = wrapper.findAll('button').find(item => item.text() === 'AI 视觉审核')!
|
||||
expect(button.attributes('disabled')).toBeDefined()
|
||||
wrapper
|
||||
.findAllComponents(NCheckbox)
|
||||
.find(item => item.text().includes('单独确认'))!
|
||||
.vm.$emit('update:checked', true)
|
||||
await flushPromises()
|
||||
await click('AI 视觉审核')
|
||||
expect(wrapper.text()).toContain('机器:AI 视觉审核通过')
|
||||
expect(wrapper.text()).toContain('资产:草稿')
|
||||
expect(mock.calls.filter(call => call.url.endsWith('/confirm'))).toHaveLength(0)
|
||||
expect(
|
||||
wrapper
|
||||
.findAll('button')
|
||||
.find(item => item.text() === '正式人工确认母版')!
|
||||
.attributes('disabled')
|
||||
).toBeDefined()
|
||||
})
|
||||
it('按需读取来源影响,原件可读与过期独立展示,不改历史 Primary', async () => {
|
||||
const mock = await setup()
|
||||
expect(mock.calls.filter(call => call.url.endsWith('/recovery-impact'))).toHaveLength(0)
|
||||
wrapper.findComponent(NTabs).vm.$emit('update:value', 'impact')
|
||||
await flushPromises()
|
||||
expect(wrapper.text()).toContain('图片原件有效 ≠ 来源当前有效')
|
||||
expect(wrapper.text()).toContain('关联镜头8')
|
||||
const headings = wrapper.findAll('.n-collapse-item__header-main')
|
||||
await headings.find(item => item.text().includes('星港相遇'))!.trigger('click')
|
||||
await flushPromises()
|
||||
expect(wrapper.text()).toContain('原件与原审核一致')
|
||||
expect(wrapper.text()).toContain('布局版本已变化')
|
||||
expect(wrapper.text()).toContain('历史主首帧(Primary)')
|
||||
expect(wrapper.text()).toContain('需要重新核验')
|
||||
expect(mock.calls.every(call => call.method === 'GET')).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,151 @@
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import { spatialMasterApi } from '@/features/spatial-layouts/api'
|
||||
import {
|
||||
canUseMasterReference,
|
||||
masterReviewLabels,
|
||||
toMasterPreview,
|
||||
impactVisionLabel
|
||||
} from '@/features/spatial-layouts/model'
|
||||
import { runGuardedImageRequest, imageRequestNotice } from '@/features/subject-images/image-request-guard'
|
||||
|
||||
/** 所有请求均由隔离 Mock 接收,禁止连接真实 Provider。 */
|
||||
afterEach(() => {
|
||||
sessionStorage.clear()
|
||||
vi.unstubAllGlobals()
|
||||
})
|
||||
describe('F04 母版正式契约与独立证据', () => {
|
||||
it('历史及草稿修订预检、生成复用同一参数与指纹', async () => {
|
||||
const fetcher = vi.fn<typeof fetch>(async () => new Response(JSON.stringify({ data: {} })))
|
||||
vi.stubGlobal('fetch', fetcher)
|
||||
const input = {
|
||||
expectedVersion: 'a'.repeat(64),
|
||||
referenceMasterId: 'draft',
|
||||
revisionInstruction: '仅调整活动方向',
|
||||
providerName: 'provider',
|
||||
generationOptions: { size: '2048x2048' }
|
||||
}
|
||||
await spatialMasterApi.preflight('p/a', 'l/b', input)
|
||||
await spatialMasterApi.generate('p/a', 'l/b', {
|
||||
...input,
|
||||
expectedPreviewFingerprint: 'f'.repeat(64),
|
||||
confirmPaidGeneration: true
|
||||
})
|
||||
expect(String(fetcher.mock.calls[0]![0])).toBe(
|
||||
'/api/projects/p%2Fa/shared-spatial-layouts/l%2Fb/masters/generation-preflight'
|
||||
)
|
||||
expect(JSON.parse(String(fetcher.mock.calls[0]![1]?.body))).toEqual(input)
|
||||
expect(JSON.parse(String(fetcher.mock.calls[1]![1]?.body))).toEqual({
|
||||
...input,
|
||||
expectedPreviewFingerprint: 'f'.repeat(64),
|
||||
confirmPaidGeneration: true
|
||||
})
|
||||
})
|
||||
it('来源影响、人工清单和单独 Vision 使用正式路径及独立费用确认', async () => {
|
||||
const fetcher = vi.fn<typeof fetch>(async () => new Response(JSON.stringify({ data: {} })))
|
||||
vi.stubGlobal('fetch', fetcher)
|
||||
await spatialMasterApi.impact('p', 'l', new AbortController().signal)
|
||||
await spatialMasterApi.review('p', 'l', 'm')
|
||||
await spatialMasterApi.validate('p', 'l', 'm')
|
||||
await spatialMasterApi.confirm('p', 'l', 'm', {
|
||||
expectedVersion: 'a'.repeat(64),
|
||||
evidence: '人工依据',
|
||||
confirmedBy: '审核人',
|
||||
reviewResults: [{ index: 1, result: 'passed', evidence: '连接位置可见' }]
|
||||
})
|
||||
expect(fetcher.mock.calls.map(([url]) => String(url))).toEqual([
|
||||
'/api/projects/p/shared-spatial-layouts/l/masters/recovery-impact',
|
||||
'/api/projects/p/shared-spatial-layouts/l/masters/m/review',
|
||||
'/api/projects/p/shared-spatial-layouts/l/masters/m/validate',
|
||||
'/api/projects/p/shared-spatial-layouts/l/masters/m/confirm'
|
||||
])
|
||||
expect(JSON.parse(String(fetcher.mock.calls[2]![1]?.body))).toEqual({ confirmPaidValidation: true })
|
||||
})
|
||||
it('草稿只有明确修订且属于当前布局版本才能作参考,人工通过不冒充 Vision 通过', () => {
|
||||
expect(canUseMasterReference({ status: 'draft', spatialLayoutVersion: 'old' }, 'now', true)).toBe(false)
|
||||
expect(canUseMasterReference({ status: 'draft', spatialLayoutVersion: 'now' }, 'now', false)).toBe(false)
|
||||
expect(canUseMasterReference({ status: 'draft', spatialLayoutVersion: 'now' }, 'now', true)).toBe(true)
|
||||
expect(canUseMasterReference({ status: 'confirmed', spatialLayoutVersion: 'old' }, 'now', false)).toBe(true)
|
||||
expect(
|
||||
masterReviewLabels({
|
||||
status: 'confirmed',
|
||||
currentVersion: true,
|
||||
reviewStatus: 'human_passed',
|
||||
automatedVisionPassed: false
|
||||
})
|
||||
).toMatchObject({ human: '人工审核通过', vision: 'AI 视觉审核未通过或未运行', asset: '已确认' })
|
||||
})
|
||||
it('完成但质量待复核不能展示通过,历史分步证据缺失明确保留未知', () => {
|
||||
expect(
|
||||
impactVisionLabel({
|
||||
id: 'v',
|
||||
status: 'completed',
|
||||
passed: true,
|
||||
qualityDecision: 'needs_review',
|
||||
evidenceComplete: true,
|
||||
historical: true
|
||||
})
|
||||
).toBe('原结论待人工复核')
|
||||
expect(
|
||||
impactVisionLabel({
|
||||
id: 'v',
|
||||
status: 'running',
|
||||
passed: true,
|
||||
qualityDecision: 'passed',
|
||||
evidenceComplete: true,
|
||||
historical: false
|
||||
})
|
||||
).toBe('原审核未完成')
|
||||
})
|
||||
it('适配预检时保留原始参数和参考摘要,不虚构预计费用或正式确认', () => {
|
||||
const result = toMasterPreview({
|
||||
layoutId: 'l',
|
||||
layoutVersion: 'a'.repeat(64),
|
||||
provider: 'provider',
|
||||
model: 'model',
|
||||
generationOptions: { size: '2048x2048' },
|
||||
prompt: '最终画面描述',
|
||||
references: [
|
||||
{
|
||||
imageId: 'm',
|
||||
imageUrl: '/storage/m.png',
|
||||
providerImageUrl: 'data:image/png;base64,AA==',
|
||||
providerInputResolved: true,
|
||||
role: 'layout-master',
|
||||
sourceMasterStatus: 'draft'
|
||||
}
|
||||
],
|
||||
previewFingerprint: 'f'.repeat(64),
|
||||
referenceMasterId: 'm',
|
||||
revisionInstruction: '修订',
|
||||
referenceCount: 1,
|
||||
verifiedSceneCount: 2,
|
||||
maxReferenceImages: 10,
|
||||
generationAllowed: false,
|
||||
reason: '免费预检'
|
||||
})
|
||||
expect(result.providerPrompt).toBe('最终画面描述')
|
||||
expect(result.referenceImages).toEqual(['/storage/m.png'])
|
||||
expect(result.previewFingerprint).toBe('f'.repeat(64))
|
||||
})
|
||||
it('仅在请求确定被拒绝且只读证据证明没有创建任务时解除费用保护', async () => {
|
||||
const target = 'master-reject'
|
||||
const reject = new Error('来源过期')
|
||||
const proof = vi.fn<() => Promise<boolean>>().mockResolvedValue(true)
|
||||
await expect(
|
||||
runGuardedImageRequest(
|
||||
target,
|
||||
async () => {
|
||||
throw reject
|
||||
},
|
||||
{ confirmRejection: proof }
|
||||
)
|
||||
).rejects.toBe(reject)
|
||||
expect(imageRequestNotice(target)).toBe('')
|
||||
const calls = vi.fn<() => Promise<void>>().mockRejectedValue(new Error('连接中断'))
|
||||
await expect(runGuardedImageRequest(target, calls, { confirmRejection: async () => false })).rejects.toThrow(
|
||||
'连接中断'
|
||||
)
|
||||
await expect(runGuardedImageRequest(target, calls)).rejects.toThrow('费用待核对')
|
||||
expect(calls).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user