feat: init test utils

pull/25/head
An Phan 5 years ago committed by =
parent ed2e52f3b1
commit 758e25aa5c

@ -0,0 +1,12 @@
import path from 'path'
import fs from 'fs'
export const getFragment = (
dir: string,
name: string,
fragmentsDir = 'fragments'
): string => {
const target = path.resolve(dir, `${fragmentsDir}/${name}`)
// just return the file content for now
return fs.readFileSync(target, 'utf-8')
}

@ -0,0 +1 @@
export * from './getFragment'
Loading…
Cancel
Save