fix(core): update
This commit is contained in:
1
test/assets/moduleExample.d.ts
vendored
1
test/assets/moduleExample.d.ts
vendored
@ -1 +0,0 @@
|
||||
export declare let exportedTestBoolean: boolean;
|
@ -1,4 +0,0 @@
|
||||
"use strict";
|
||||
exports.exportedTestBoolean = true;
|
||||
console.log('moduleExample loaded successfully');
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlRXhhbXBsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIm1vZHVsZUV4YW1wbGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFXLFFBQUEsbUJBQW1CLEdBQUcsSUFBSSxDQUFBO0FBRXJDLE9BQU8sQ0FBQyxHQUFHLENBQUMsbUNBQW1DLENBQUMsQ0FBQSJ9
|
@ -1,3 +0,0 @@
|
||||
export let exportedTestBoolean = true
|
||||
import * as q from 'q'
|
||||
console.log('moduleExample loaded successfully')
|
25
test/test.ts
25
test/test.ts
@ -1,18 +1,15 @@
|
||||
import { tap, expect } from 'tapbundle'
|
||||
import * as smartsystem from '../ts/index'
|
||||
import * as _moduleExample from './assets/moduleExample'
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
import * as smartsystem from '../ts/index';
|
||||
|
||||
let lazyModuleExample: smartsystem.LazyModule<typeof _moduleExample>
|
||||
let smartsystemInstance: smartsystem.Smartsystem;
|
||||
|
||||
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 create a smartsystem instance', async tools => {
|
||||
smartsystemInstance = new smartsystem.Smartsystem();
|
||||
expect(smartsystemInstance).to.be.instanceOf(smartsystem.Smartsystem);
|
||||
});
|
||||
|
||||
tap.test('should load the module', async () => {
|
||||
await lazyModuleExample.load().then(async m => {
|
||||
console.log(m.exportedTestBoolean)
|
||||
})
|
||||
})
|
||||
tap.test('should state the operating system', async () => {
|
||||
expect(smartsystemInstance.cpuCount);
|
||||
});
|
||||
|
||||
tap.start()
|
||||
tap.start();
|
||||
|
Reference in New Issue
Block a user