import { expect } from '@loopback/testlab' ; import { assertGreetings , generateBundle } from './test-helper' ; describe ( 'bundle-node.js' , ( ) => { let bundle ; before ( 'generate bundle-node.js' , async function ( this ) { this . timeout ( 50000 ) ; await generateBundle ( 'node' ) ; bundle = require ( '../../bundle-node' ) ; } ) ; it ( 'invokes main function' , async ( ) => { const greetings = await bundle . main ( ) ; assertGreetings ( greetings ) ; } ) ; it ( 'has access to Context' , async ( ) => { const ctx = new bundle . Context ( 'my-ctx' ) ; expect ( ctx . name ) . to . eql ( 'my-ctx' ) ; } ) ; } ) ;