import path from 'path' ; export function init ( projectRoot ) { try { let chaiPath = require . resolve ( 'chai' ) ; if ( chaiPath . startsWith ( path . join ( __dirname , '..' , 'node_modules' ) ) ) { chaiPath = require . resolve ( 'chai' , { paths : [ projectRoot ] } ) ; } const chai = require ( chaiPath ) ; const { patractChai } = require ( './chai' ) ; chai . use ( patractChai ) ; } catch ( error ) { } }