streamline things

This commit is contained in:
2017-07-31 15:16:10 +02:00
parent 04518f28cf
commit f4290ca8fa
5 changed files with 34 additions and 74 deletions

View File

@ -1,10 +1,15 @@
import { tap, expect } from 'tapbundle'
import * as smartsystem from '../dist/index'
import * as smartsystem from '../ts/index'
import * as _moduleExample from './assets/moduleExample'
tap.test('should load a module lazily', async (tools) => {
let lazyModuleExample = new smartsystem.LazyModule<typeof _moduleExample>('./assets/moduleExample.js', __dirname)
let lazyModuleExample: smartsystem.LazyModule<typeof _moduleExample>
tap.test('should create a lazy module instance', async (tools) => {
lazyModuleExample = new smartsystem.LazyModule<typeof _moduleExample>('./assets/moduleExample.js', __dirname)
expect(lazyModuleExample).to.be.instanceof(smartsystem.LazyModule)
})
tap.test('should load the module', async () => {
await lazyModuleExample.load().then(async m => {
console.log(m.exportedTestBoolean)
})