import * as path from 'path' ; import { getHintPath , HintLocalTest , testLocalHint } from '@hint/utils-tests-helpers' ; import { Severity } from '@hint/utils-types' ; const hintPath = getHintPath ( __filename , true ) ; const tests = [ { name : 'Valid configuration should pass' , path : path . join ( __dirname , 'fixtures' , 'valid' ) } , { name : `If there is no config file, it should pass` , path : path . join ( __dirname , 'fixtures' , 'noconfig' ) } , { name : 'Invalid configuration should fail' , path : path . join ( __dirname , 'fixtures' , 'invalidconfig' ) , reports : [ { message : `Invalid or unexpected token` , severity : Severity . error } ] } ] ; testLocalHint ( hintPath , tests , { parsers : [ 'webpack-config' ] } ) ;