import * as SUT from '../index' ; import { HarEntry } from '../index' ; import path from 'path' ; describe ( 'har-writer' , ( ) : void => { test ( 'should reduce HAR file' , async ( ) : Promise < void > => { const inputFile = path . join ( __dirname , 'github.com.har' ) ; const outputFile = path . join ( __dirname , 'github-reduced.har' ) ; const entryFilter = ( entry ) : boolean => { if ( entry . request . method === 'POST' ) { return true ; } return false ; } ; SUT . reduceHarFile ( { inputFile , outputFile , entryFilter } ) ; } ) ; } ) ;