fix: address review followups
This commit is contained in:
@@ -72,7 +72,7 @@ describe('Login surface', () => {
|
||||
expect(githubLink.props.target).toBe('_blank');
|
||||
expect(tokenInput.props.type).toBe('password');
|
||||
} finally {
|
||||
root.unmount();
|
||||
root?.unmount();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -139,7 +139,7 @@ export default function SiteDistributionChart({ data, loading }: SiteDistributio
|
||||
value: (datum: unknown) => {
|
||||
const item = coerceDatumRecord(datum);
|
||||
const pct = safeNumber(item._percent_);
|
||||
return `${safeNumber(pct).toFixed(1)}%`;
|
||||
return `${pct.toFixed(1)}%`;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -193,7 +193,7 @@ describe('DownstreamKeys page', () => {
|
||||
expect(text).toContain('主分组');
|
||||
expect(text).toContain('移动端');
|
||||
} finally {
|
||||
root.unmount();
|
||||
root?.unmount();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -447,7 +447,7 @@ describe('DownstreamKeys page', () => {
|
||||
expect(collectText(root!.root)).not.toContain('固定窗口对比');
|
||||
expect(collectText(root!.root)).not.toContain('trend:2');
|
||||
} finally {
|
||||
root.unmount();
|
||||
root?.unmount();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ describe('Accounts create intent handling', () => {
|
||||
const selects = root.root.findAllByType(ModernSelect);
|
||||
expect(selects[1]?.props.value).toBe('10');
|
||||
} finally {
|
||||
root.unmount();
|
||||
root?.unmount();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -77,7 +77,7 @@ describe('Accounts create intent handling', () => {
|
||||
const selects = root.root.findAllByType(ModernSelect);
|
||||
expect(selects[1]?.props.value).toBe('10');
|
||||
} finally {
|
||||
root.unmount();
|
||||
root?.unmount();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -88,7 +88,7 @@ describe('Accounts create intent handling', () => {
|
||||
expect(rendered).not.toContain('添加 Session 连接');
|
||||
expect(rendered).not.toContain('添加 API Key 连接');
|
||||
} finally {
|
||||
root.unmount();
|
||||
root?.unmount();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -146,7 +146,7 @@ describe('Sites disabled models save', () => {
|
||||
|
||||
expect(apiMock.updateSiteDisabledModels).toHaveBeenCalledWith(1, ['gpt-4o']);
|
||||
} finally {
|
||||
root.unmount();
|
||||
root?.unmount();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -190,7 +190,7 @@ describe('Sites disabled models save', () => {
|
||||
|
||||
expect(apiMock.updateSiteDisabledModels).toHaveBeenCalledWith(1, ['gpt-4o']);
|
||||
} finally {
|
||||
root.unmount();
|
||||
root?.unmount();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user