Skip to content

Commit

Permalink
more skips?
Browse files Browse the repository at this point in the history
  • Loading branch information
mmkal committed Sep 20, 2024
1 parent c615054 commit ce8fea8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 4 additions & 7 deletions packages/typegen/test/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,10 @@ export const getPoolHelper = (params: {__filename: string; baseConnectionURI: st
// afterAll(async () => new Promise(r => setTimeout(r, 1)))

const setupDb = async () => {
const exists = Boolean(await admin.maybeOne(sql`select 1 from pg_database where datname = ${dbName}`))
if (!exists) {
await admin.query(sql`create database ${sql.identifier([dbName])}`).catch(e => {
if (e.message.endsWith('unique_violation')) return
throw e
})
}
await admin.query(sql`create database ${sql.identifier([dbName])}`).catch(e => {
if (e.message.endsWith('(unique_violation)')) return
throw e
})

await pool.query(sql`
drop schema if exists ${schemaIdentifier} cascade;
Expand Down
4 changes: 3 additions & 1 deletion packages/typegen/test/watch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as fs from 'fs'
import * as fsSyncer from 'fs-syncer'
import * as path from 'path'

import {test, beforeEach, expect, vi as jest} from 'vitest'
import {test as _test, beforeEach, expect, vi as jest} from 'vitest'

import * as typegen from '../src'
import {getPureHelper as getHelper} from './helper'
Expand All @@ -14,6 +14,8 @@ beforeEach(async () => {
await helper.setupDb()
})

const test = process.env.CI ? _test.skip : _test

test(
'watch file system',
async () => {
Expand Down

0 comments on commit ce8fea8

Please sign in to comment.