fix(pos): type checkout test stub as PosPb to satisfy tsc
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
0282d43109
commit
4d58bde6ff
1 changed files with 4 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ import {
|
|||
listActiveStockCatalog,
|
||||
listSalesInRange,
|
||||
searchCustomersForPos,
|
||||
type PosPb,
|
||||
} from "./pos-service";
|
||||
|
||||
function stubPb(items: unknown[]) {
|
||||
|
|
@ -88,6 +89,8 @@ function stubCheckoutPb(opts: {
|
|||
let itemCounter = 0;
|
||||
|
||||
return {
|
||||
// Cast because the stub's collection() returns concrete row shapes,
|
||||
// while PosPb declares getList/getOne/create generically.
|
||||
pb: {
|
||||
collection: (name: string) => ({
|
||||
getFullList: vi.fn(),
|
||||
|
|
@ -147,7 +150,7 @@ function stubCheckoutPb(opts: {
|
|||
return { id, ...data };
|
||||
}),
|
||||
}),
|
||||
},
|
||||
} as unknown as PosPb,
|
||||
created,
|
||||
updates,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue