fix(product): 透传产品树AppData保存失败
This commit is contained in:
13
apps/web/lib/product-store-persistence-source.test.ts
Normal file
13
apps/web/lib/product-store-persistence-source.test.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import test from 'node:test';
|
||||
|
||||
test('product store save helper does not swallow AppData save failures', () => {
|
||||
const source = readFileSync(join(process.cwd(), 'stores/useProductStore.ts'), 'utf8');
|
||||
|
||||
assert.match(
|
||||
source,
|
||||
/async function saveStoredOverview\(data: ProductOverview\[\]\) \{\s+await saveServerData\('products-overview', data\);\s+\}/,
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user