5分钟策划agent (#159)
Co-authored-by: 段舒康 <kdletters@qq.com> Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/159 Co-authored-by: Linghong <ink29535@proton.me> Co-committed-by: Linghong <ink29535@proton.me>
This commit was merged in pull request #159.
This commit is contained in:
@@ -9,10 +9,7 @@ import {
|
||||
describe('普通图片 assetKind 清理脚本', () => {
|
||||
it('默认 dry-run 并要求调用方显式选择 apply', () => {
|
||||
expect(
|
||||
parseOptions(
|
||||
['--database', 'genarrative-prod', '--server', 'prod'],
|
||||
{},
|
||||
),
|
||||
parseOptions(['--database', 'genarrative-prod', '--server', 'prod'], {}),
|
||||
).toMatchObject({
|
||||
apply: false,
|
||||
chunkSize: 25,
|
||||
@@ -102,13 +99,15 @@ describe('普通图片 assetKind 清理脚本', () => {
|
||||
for (let index = 1; index < calls.length; index += 2) {
|
||||
expect(calls[index]?.expected_batch_sha_256).toEqual([
|
||||
0,
|
||||
String(calls[index - 1]?.scope === 'asset'
|
||||
? 'a'
|
||||
: calls[index - 1]?.scope === 'project-resource'
|
||||
? 'b'
|
||||
: calls[index - 1]?.scope === 'showcase'
|
||||
? 'c'
|
||||
: 'd').repeat(64),
|
||||
String(
|
||||
calls[index - 1]?.scope === 'asset'
|
||||
? 'a'
|
||||
: calls[index - 1]?.scope === 'project-resource'
|
||||
? 'b'
|
||||
: calls[index - 1]?.scope === 'showcase'
|
||||
? 'c'
|
||||
: 'd',
|
||||
).repeat(64),
|
||||
]);
|
||||
}
|
||||
});
|
||||
@@ -188,10 +187,7 @@ describe('普通图片 assetKind 清理脚本', () => {
|
||||
|
||||
let message = '';
|
||||
try {
|
||||
await scanScopes(
|
||||
{ chunkSize: 25 },
|
||||
{ callProcedure: loopingCall },
|
||||
);
|
||||
await scanScopes({ chunkSize: 25 }, { callProcedure: loopingCall });
|
||||
} catch (error) {
|
||||
message = error instanceof Error ? error.message : String(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user