chore: fix prettier formatting
This commit is contained in:
@@ -166,9 +166,7 @@ describe('yookassa getPayment', () => {
|
||||
describe('yookassa buildReceipt', () => {
|
||||
it('builds receipt with order items', () => {
|
||||
const result = buildReceipt({
|
||||
orderItems: [
|
||||
{ titleSnapshot: 'Test Product', qty: 2, priceCentsSnapshot: 100000 },
|
||||
],
|
||||
orderItems: [{ titleSnapshot: 'Test Product', qty: 2, priceCentsSnapshot: 100000 }],
|
||||
deliveryFeeCents: 0,
|
||||
userEmail: 'user@test.ru',
|
||||
})
|
||||
@@ -187,9 +185,7 @@ describe('yookassa buildReceipt', () => {
|
||||
|
||||
it('adds delivery item when deliveryFeeCents > 0', () => {
|
||||
const result = buildReceipt({
|
||||
orderItems: [
|
||||
{ titleSnapshot: 'Item A', qty: 1, priceCentsSnapshot: 50000 },
|
||||
],
|
||||
orderItems: [{ titleSnapshot: 'Item A', qty: 1, priceCentsSnapshot: 50000 }],
|
||||
deliveryFeeCents: 35000,
|
||||
userEmail: 'user@test.ru',
|
||||
})
|
||||
@@ -202,9 +198,7 @@ describe('yookassa buildReceipt', () => {
|
||||
|
||||
it('passes through taxSystemCode', () => {
|
||||
const result = buildReceipt({
|
||||
orderItems: [
|
||||
{ titleSnapshot: 'Item', qty: 1, priceCentsSnapshot: 1000 },
|
||||
],
|
||||
orderItems: [{ titleSnapshot: 'Item', qty: 1, priceCentsSnapshot: 1000 }],
|
||||
deliveryFeeCents: 0,
|
||||
userEmail: 'user@test.ru',
|
||||
taxSystemCode: 3,
|
||||
@@ -241,15 +235,11 @@ describe('yookassa validateWebhook', () => {
|
||||
})
|
||||
|
||||
it('throws if missing event', () => {
|
||||
expect(() => validateWebhook('127.0.0.1', { type: 'notification', object: {} })).toThrow(
|
||||
'Missing event or object',
|
||||
)
|
||||
expect(() => validateWebhook('127.0.0.1', { type: 'notification', object: {} })).toThrow('Missing event or object')
|
||||
})
|
||||
|
||||
it('throws if missing object', () => {
|
||||
expect(() => validateWebhook('127.0.0.1', { type: 'notification', event: 'x' })).toThrow(
|
||||
'Missing event or object',
|
||||
)
|
||||
expect(() => validateWebhook('127.0.0.1', { type: 'notification', event: 'x' })).toThrow('Missing event or object')
|
||||
})
|
||||
|
||||
it('throws for invalid body type', () => {
|
||||
|
||||
Reference in New Issue
Block a user