Skip to content

Instantly share code, notes, and snippets.

View Weakky's full-sized avatar
🎯

Flavian Desverne Weakky

🎯
View GitHub Profile
@Weakky
Weakky / react-admin-prisma.md
Last active August 22, 2018 15:10
react-admin
@Weakky
Weakky / prisma-test-environment.ts
Created January 15, 2020 21:53
Jest environment for GraphQL Santa, Prisma & Postgres
const { Client } = require('pg')
const NodeEnvironment = require('jest-environment-node')
const nanoid = require('nanoid')
const util = require('util')
const exec = util.promisify(require('child_process').exec)
const santaBinary = './node_modules/.bin/graphql-santa'
/**
* Custom test environment for graphql-santa and Postgres
@Weakky
Weakky / nexus-test-environment.js
Created June 25, 2020 09:22
SQLite jest environment for Nexus & Prisma
// tests/nexus-test-environment.js
const NodeEnvironment = require('jest-environment-node')
const { nanoid } = require('nanoid')
const util = require('util')
const exec = util.promisify(require('child_process').exec)
const fs = require('fs')
const path = require('path')
const prismaBinary = './node_modules/.bin/prisma'