import { BinaryEngine } from '@prisma/engine-core' ; import { ClientEngineType , getClientEngineType } from '@prisma/sdk' ; import path from 'path' ; describe ( 'BinaryEngine' , ( ) => { test ( 'should error correctly with invalid flags' , async ( ) => { if ( getClientEngineType ( ) === ClientEngineType . Library ) { return ; } try { const engine = new BinaryEngine ( { flags : [ '--flag-that-does-not-exist' ] , datamodelPath : path . join ( __dirname , './runtime-tests/blog/schema.prisma' ) , } ) ; await engine . start ( ) ; } catch ( e ) { expect ( e . message ) . toMatch ( ` Found argument '--flag-that-does-not-exist' which wasn't expected` ) ; } } ) ; } ) ;