smartsystem/test/test.ts

14 lines
430 B
TypeScript
Raw Normal View History

2017-05-13 09:03:24 +00:00
import { tap, expect } from 'tapbundle'
2016-10-11 23:41:30 +00:00
import * as smartsystem from '../dist/index'
2017-05-13 09:03:24 +00:00
import * as _moduleExample from './assets/moduleExample'
2016-10-12 12:01:15 +00:00
2017-05-13 09:03:24 +00:00
tap.test('should load a module lazily', async (tools) => {
let lazyModuleExample = new smartsystem.LazyModule<typeof _moduleExample>('./assets/moduleExample.js', __dirname)
2016-10-12 12:01:15 +00:00
2017-05-13 09:03:24 +00:00
await lazyModuleExample.load().then(async m => {
console.log(m.exportedTestBoolean)
})
2016-10-12 12:01:15 +00:00
})
2017-05-13 09:03:24 +00:00
tap.start()