import fs from 'fs' ; import { join } from 'path' ; const fixturesDir = join ( __dirname , '..' , 'fixtures' ) ; export function getFixtureJson ( fixtureName ) { try { const fixturePath = join ( fixturesDir , `${ fixtureName }.json` ) ; const fileContents = fs . readFileSync ( fixturePath , 'utf8' ) ; return JSON . parse ( fileContents ) ; } catch ( e ) { return { } ; } }