streamline things
This commit is contained in:
11
test/test.ts
11
test/test.ts
@ -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)
|
||||
})
|
||||
|
Reference in New Issue
Block a user