mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 13:49:09 +03:00
* update gh action, update vitest config * debug * debug cov * idk try something different * test2 * test3 * add base path * rm debug * add apiAuthenticate tests * supabaseClient tests * apiWrappers tests * add apiHelpers tests * add configcat tests * add formatSql tests * add github tests * add cloudprovider utils tests * add helpers tests * fix typeerr * add missing readonly err * fix typeerrrs * fix type errors in apiWrapper tests * fix apiHelpers test * add packages/ui tests * add coveralls flags * try coveralls parallel config * fix coveralls parallel config --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
20 lines
419 B
TypeScript
20 lines
419 B
TypeScript
import { formatSql } from './formatSql'
|
|
import { describe, it, expect } from 'vitest'
|
|
|
|
describe('formatSql', () => {
|
|
it('should format SQL', () => {
|
|
const result = formatSql('SELECT * FROM users')
|
|
|
|
expect(result).toBe(`select
|
|
*
|
|
from
|
|
users`)
|
|
})
|
|
|
|
it('should return the original argument if it is not valid, not throw', () => {
|
|
const result = formatSql('123')
|
|
|
|
expect(result).toBe('123')
|
|
})
|
|
})
|