Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Tests database schemas, data integrity, migrations, transaction isolation, and query performance using SQL and JavaScript examples.
67% 83%+17 ptsof test cases passed
Passed 20 of 24 test cases with the skill, and 16 of 24 without it.
3 of 3 safety checks passed
Not used yet
Data is your most valuable asset. Database bugs cause data loss/corruption.
Database testing ensures schema correctness, data integrity, transaction safety, and query performance. Critical for preventing catastrophic data issues.
Validate database structure:
-- Test schema exists
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'public' AND table_name = 'users';
-- Test column types
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_name = 'users';
-- Test constraints
SELECT constraint_name, constraint_type
FROM information_schema.table_constraints
WHERE table_name = 'users';
Test with code:
test('users table has correct schema', async () => {
const schema = await db.raw(`
SELECT column_name, data_type, is_nullable
FROM information_schema.columns
WHERE table_name = 'users'
`);
expect(schema).toContainEqual({
column_name: 'id',
data_type: 'integer',
is_nullable: 'NO'
Next to this one in the catalogue, plus more from the same author.