-
Notifications
You must be signed in to change notification settings - Fork 0
Pre-resubmission cleanup: privacy fix, auth hardening, dead code removal #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
b318a7e
7a73672
538d270
1949cd0
1f9d203
2f7d0b8
8d762bd
8e92fd3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,7 @@ | |
| "backgroundColor": "#F5F0E8" | ||
| } | ||
| ], | ||
| "expo-secure-store", | ||
| [ | ||
| "expo-build-properties", | ||
| { | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,31 +3,10 @@ import { readFileSync } from "node:fs"; | |
| import test from "node:test"; | ||
|
ginnaaph marked this conversation as resolved.
|
||
|
|
||
| const apiSource = readFileSync(new URL("./api.ts", import.meta.url), "utf8"); | ||
| const joinWaitlistSource = apiSource.match( | ||
| /export async function joinWaitlist[\s\S]*?(?=\nexport async function)/, | ||
| )?.[0]; | ||
|
|
||
| assert.ok(joinWaitlistSource, "joinWaitlist source should exist"); | ||
|
|
||
| test("joins the public waitlist with a normalized email and fixed source", () => { | ||
| assert.match( | ||
| joinWaitlistSource, | ||
| /export async function joinWaitlist\(\s*email: string,\s*\): Promise<WaitlistJoinResult>/, | ||
| ); | ||
| assert.match( | ||
| joinWaitlistSource, | ||
| /const normalizedEmail = email\.trim\(\)\.toLowerCase\(\)/, | ||
| ); | ||
| assert.match( | ||
| joinWaitlistSource, | ||
| /getPublicSupabaseClient\(\)[\s\S]*\.from\("waitlist_signups"\)[\s\S]*\.insert\(\{[\s\S]*email: normalizedEmail,[\s\S]*source: "public_share",[\s\S]*\}\)/, | ||
| ); | ||
| assert.match(joinWaitlistSource, /return "joined"/); | ||
| assert.doesNotMatch(joinWaitlistSource, /\.select\(/); | ||
| }); | ||
|
|
||
| test("maps only unique violations to the already joined result", () => { | ||
| assert.match(joinWaitlistSource, /error\?\.code === "23505"/); | ||
| assert.match(joinWaitlistSource, /return "already_joined"/); | ||
| assert.match(joinWaitlistSource, /throw error/); | ||
| test("does not expose an app-level public waitlist API", () => { | ||
| assert.doesNotMatch(apiSource, /type WaitlistJoinResult/); | ||
| assert.doesNotMatch(apiSource, /export async function joinWaitlist/); | ||
| assert.doesNotMatch(apiSource, /\.from\("waitlist_signups"\)/); | ||
| assert.doesNotMatch(apiSource, /source: "public_share"/); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Use semantic absence checks across both cleanup tests. Both tests rely on formatting-dependent source regexes, allowing equivalent API exports or UI implementations to evade regression coverage.
📍 Affects 2 files
🤖 Prompt for AI Agents |
||
| }); | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.