anti-work / shortest

Have AI write and update tests for you
https://shortest.com
MIT License
187 stars 21 forks source link

New .shortest.ts #69

Open slavingia opened 1 month ago

slavingia commented 1 month ago

A new testing format that allows testing web apps end-to-end really quickly and efficiently.

Goals:

Specifics:

Example test:

// app/shortest.ts import { page } from 'page.tsx';

test("A user can sign up to flexile and send an invoice", async (page) => { await shortest.db.changed( SELECT * FROM users AND created_at > NOW() - interval '5 minutes' LIMIT 1 );

await shortest.email_received({ to: 'client@example.com', subject: 'New Invoice', contains: '$100.00' }); });

Ideas:

m2rads commented 5 hours ago

Alright then, I am working on one more PR that will complete this feature by having AI deciding when to run the assertion. For example, run the assertion after user signed up and validate a new record has been created in db. I will record a demo afterwards.

slavingia commented 5 hours ago

Ah interesting!