Skip to content

Commit

Permalink
assert declaration file
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Jun 27, 2019
1 parent ba92c41 commit 47b02f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions prisma2/src/__tests__/integrate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import { Client } from 'pg'
import assert from 'assert'
import pkgup from 'pkg-up'
import del from 'del'
import fs from 'fs'

const host = process.env.TEST_POSTGRES_URI || 'postgres://localhost:5432/prisma-dev'

console.log({ host })

const db = new Client({
connectionString: host,
})
Expand Down Expand Up @@ -59,6 +58,11 @@ async function runTest(t) {

await generate(isdl)
const photonPath = join(tmp, 'index.js')
const photonDeclarationPath = join(tmp, 'index.d.ts')

assert(fs.existsSync(photonDeclarationPath))
assert(fs.existsSync(photonPath))

// clear the require cache
delete require.cache[photonPath]
const { default: Photon } = await import(photonPath)
Expand Down

0 comments on commit 47b02f4

Please sign in to comment.