🐛 add env to useDb and apply prettier
tinyedge/deploy Deployed by TinyEdge

This commit is contained in:
2026-08-07 13:28:26 +02:00
parent 67727f96ab
commit cbe1b42f6e
54 changed files with 5492 additions and 2406 deletions
+13 -13
View File
@@ -1,24 +1,24 @@
import { describe, expect, it } from 'vitest'
import { isValidPaymentLink } from './paymentLink'
import { describe, expect, it } from 'vitest';
import { isValidPaymentLink } from './paymentLink';
describe('isValidPaymentLink', () => {
it('accepts an https PayPal.me link', () => {
expect(isValidPaymentLink('https://paypal.me/janedoe')).toBe(true)
})
expect(isValidPaymentLink('https://paypal.me/janedoe')).toBe(true);
});
it('accepts an http link', () => {
expect(isValidPaymentLink('http://paypal.me/janedoe')).toBe(true)
})
expect(isValidPaymentLink('http://paypal.me/janedoe')).toBe(true);
});
it('rejects an empty string', () => {
expect(isValidPaymentLink('')).toBe(false)
})
expect(isValidPaymentLink('')).toBe(false);
});
it('rejects a javascript: URI', () => {
expect(isValidPaymentLink('javascript:alert(1)')).toBe(false)
})
expect(isValidPaymentLink('javascript:alert(1)')).toBe(false);
});
it('rejects a value that is not a URL at all', () => {
expect(isValidPaymentLink('not a link')).toBe(false)
})
})
expect(isValidPaymentLink('not a link')).toBe(false);
});
});