import { TestKafka } from "@fluidframework/server-test-utils" ; import { strict as assert } from "assert" ; import { KafkaRunnerFactory } from "../../kafka-service/runnerFactory" ; import { TestPartitionLambdaFactory } from "./testPartitionLambdaFactory" ; describe ( "kafka-service" , ( ) => { describe ( "KafkaRunnerFactory" , ( ) => { let testFactory ; beforeEach ( ( ) => { testFactory = new KafkaRunnerFactory ( ) ; } ) ; describe ( ".create" , ( ) => { it ( "Should be able to create a runner" , async ( ) => { const testKafka = new TestKafka ( ) ; const lambdaFactory = new TestPartitionLambdaFactory ( ) ; const consumer = testKafka . createConsumer ( ) ; const runner = testFactory . create ( { consumer , dispose : ( ) => Promise . resolve ( ) , lambdaFactory } ) ; assert . ok ( runner ) ; } ) ; } ) ; } ) ; } ) ;