{
@@ -114,9 +114,9 @@ describe('markdownToEmailHtml', () => {
describe('markdownToPlainText', () => {
it('strips markdown syntax but keeps the text readable', () => {
- const text = markdownToPlainText('# Title\n\n**Bold** and [a link](https://saasrow.com)\n\n- one\n- two')
+ const text = markdownToPlainText('# Title\n\n**Bold** and [a link](https://saasrow.pwa.pit.world)\n\n- one\n- two')
expect(text).toContain('Title')
- expect(text).toContain('Bold and a link (https://saasrow.com)')
+ expect(text).toContain('Bold and a link (https://saasrow.pwa.pit.world)')
expect(text).toContain('- one')
expect(text).not.toContain('**')
expect(text).not.toContain('#')
@@ -130,16 +130,16 @@ describe('markdownToPlainText', () => {
describe('buildEmailParts', () => {
const footer = [
{ text: 'You subscribed.' },
- { text: 'Unsubscribe', href: 'https://saasrow.com/unsubscribe?email=a%40b.co' },
+ { text: 'Unsubscribe', href: 'https://saasrow.pwa.pit.world/unsubscribe?email=a%40b.co' },
]
it('builds an HTML document and a matching text/plain part from one markdown source', () => {
- const { html, text } = buildEmailParts({ markdown: '## Hi\n\nSee [the site](https://saasrow.com).', heading: 'SaaSRow', footer })
+ const { html, text } = buildEmailParts({ markdown: '## Hi\n\nSee [the site](https://saasrow.pwa.pit.world).', heading: 'SaaSRow', footer })
expect(html.startsWith('')).toBe(true)
expect(html).toContain('>Hi')
- expect(html).toContain('href="https://saasrow.com/unsubscribe?email=a%40b.co"')
- expect(text).toContain('Hi\n\nSee the site (https://saasrow.com).')
- expect(text).toContain('\n--\nYou subscribed.\nUnsubscribe: https://saasrow.com/unsubscribe?email=a%40b.co\n')
+ expect(html).toContain('href="https://saasrow.pwa.pit.world/unsubscribe?email=a%40b.co"')
+ expect(text).toContain('Hi\n\nSee the site (https://saasrow.pwa.pit.world).')
+ expect(text).toContain('\n--\nYou subscribed.\nUnsubscribe: https://saasrow.pwa.pit.world/unsubscribe?email=a%40b.co\n')
expect(text).not.toContain('<')
})
diff --git a/__tests__/lib/inviteRules.test.ts b/__tests__/lib/inviteRules.test.ts
index feba29d..5bed83e 100644
--- a/__tests__/lib/inviteRules.test.ts
+++ b/__tests__/lib/inviteRules.test.ts
@@ -78,13 +78,13 @@ describe('helpers', () => {
expect(looksLikeInviteCode(42)).toBe(false)
})
it('siteOriginFrom uses the request host, never a foreign one', () => {
- expect(siteOriginFrom(new Headers({ host: 'saasrow.com' }))).toBe('https://saasrow.com')
- expect(siteOriginFrom(new Headers({ host: 'www.saasrow.com' }))).toBe('https://saasrow.com')
+ expect(siteOriginFrom(new Headers({ host: 'saasrow.pwa.pit.world' }))).toBe('https://saasrow.pwa.pit.world')
+ expect(siteOriginFrom(new Headers({ host: 'www.saasrow.com' }))).toBe('https://saasrow.pwa.pit.world')
expect(siteOriginFrom(new Headers({ host: 'localhost:3000' }))).toBe('http://localhost:3000')
- expect(siteOriginFrom(new Headers({ 'x-forwarded-host': 'evil.example', host: 'saasrow.com' }))).toBe('https://saasrow.com')
- expect(siteOriginFrom(new Headers({ 'x-forwarded-host': 'saasrow.com', 'x-forwarded-proto': 'https', host: '127.0.0.1:3000' }))).toBe('https://saasrow.com')
+ expect(siteOriginFrom(new Headers({ 'x-forwarded-host': 'evil.example', host: 'saasrow.pwa.pit.world' }))).toBe('https://saasrow.pwa.pit.world')
+ expect(siteOriginFrom(new Headers({ 'x-forwarded-host': 'saasrow.pwa.pit.world', 'x-forwarded-proto': 'https', host: '127.0.0.1:3000' }))).toBe('https://saasrow.pwa.pit.world')
})
it('inviteUrl', () => {
- expect(inviteUrl('https://saasrow.com', 'INV-AAAA-BBBB-CCCC')).toBe('https://saasrow.com/i/INV-AAAA-BBBB-CCCC')
+ expect(inviteUrl('https://saasrow.pwa.pit.world', 'INV-AAAA-BBBB-CCCC')).toBe('https://saasrow.pwa.pit.world/i/INV-AAAA-BBBB-CCCC')
})
})
diff --git a/__tests__/lib/memberSession.test.ts b/__tests__/lib/memberSession.test.ts
index a19b2e1..d75a57d 100644
--- a/__tests__/lib/memberSession.test.ts
+++ b/__tests__/lib/memberSession.test.ts
@@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest'
import { clearMemberCookie, readMemberCookie, setMemberCookie } from '@/lib/memberSession'
-const req = (cookie?: string) => new Request('https://saasrow.com/', { headers: cookie ? { cookie } : {} })
+const req = (cookie?: string) => new Request('https://saasrow.pwa.pit.world/', { headers: cookie ? { cookie } : {} })
const valueOf = (setCookie: string) => setCookie.split(';')[0]
describe('member session cookie', () => {
diff --git a/__tests__/lib/submissionGuard.test.ts b/__tests__/lib/submissionGuard.test.ts
index 5aece40..57e7779 100644
--- a/__tests__/lib/submissionGuard.test.ts
+++ b/__tests__/lib/submissionGuard.test.ts
@@ -3,7 +3,7 @@ import { describe, expect, it } from 'vitest'
import { screenSubmission } from '@/lib/submission-guard'
const post = (ip: string, d: string, path = '/api/fn/submissions') =>
- new Request(`https://saasrow.com${path}`, {
+ new Request(`https://saasrow.pwa.pit.world${path}`, {
method: 'POST',
headers: { 'x-real-ip': ip, 'content-type': 'application/json' },
body: JSON.stringify({ title: d, url: `https://${d}.com`, email: `hello@${d}.com`, description: 'x', category: 'Software' }),
@@ -24,12 +24,12 @@ describe('screenSubmission', () => {
})
it('leaves reads and other routes alone', async () => {
- expect(await screenSubmission(new Request('https://saasrow.com/api/fn/submissions'))).toBeNull()
+ expect(await screenSubmission(new Request('https://saasrow.pwa.pit.world/api/fn/submissions'))).toBeNull()
expect(await screenSubmission(post('192.0.2.67', 'x', '/api/fn/vote'))).toBeNull()
})
it('passes a malformed body through to the edge function', async () => {
- const r = new Request('https://saasrow.com/api/fn/submissions', { method: 'POST', body: 'not json' })
+ const r = new Request('https://saasrow.pwa.pit.world/api/fn/submissions', { method: 'POST', body: 'not json' })
expect(await screenSubmission(r)).toBeNull()
})
})
diff --git a/__tests__/lib/webhooks/api.test.ts b/__tests__/lib/webhooks/api.test.ts
index ea86833..774ee83 100644
--- a/__tests__/lib/webhooks/api.test.ts
+++ b/__tests__/lib/webhooks/api.test.ts
@@ -19,7 +19,7 @@ vi.mock('@/lib/webhooks/hub', async (orig) => ({ ...(await orig