const fs = require ( 'fs' ) ; const glob = require ( 'tiny-glob/sync.js' ) ; glob ( 'samples/*/_actual.json' , { cwd : __dirname } ) . forEach ( file => { const actual = fs . readFileSync ( `${ __dirname }/${ file }` , 'utf-8' ) ; fs . writeFileSync ( `${ __dirname }/${ file . replace ( '_actual.json' , 'output.json' ) }` , actual ) ; } ) ;