本文整理汇总了TypeScript中tapbundle.tap.test方法的典型用法代码示例。如果您正苦于以下问题:TypeScript tap.test方法的具体用法?TypeScript tap.test怎么用?TypeScript tap.test使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tapbundle.tap
的用法示例。
在下文中一共展示了tap.test方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: async
import { tap, expect } from 'tapbundle'
import * as smartenv from '../ts/index'
let testEnv: smartenv.Smartenv
tap.test('should print env', async () => {
testEnv = new smartenv.Smartenv()
})
tap.test('should print a overview to console', async () => {
testEnv.printEnv()
})
tap.test('should get os', async () => {
let resultMac = await testEnv.isMacAsync()
let resultLinux = await testEnv.isLinuxAsync()
let resultWindows = await testEnv.isWindowsAsync()
const osModule = await import('os')
if (resultMac) {
expect(osModule.platform()).to.equal('darwin');
console.log('platform is Mac!')
} else if (resultLinux) {
expect(osModule.platform()).to.equal('linux');
console.log('platform is Linux!')
} else {
expect(osModule.platform()).to.equal('win32');
console.log('platform is Windows!')
}
})
示例2: require
import { tap, expect } from 'tapbundle'
import coreflow = require('../dist/index')
tap.test('should startup correctly', async () => {
coreflow.start()
})
tap.start()
示例3: async
import { expect, tap } from 'tapbundle';
import * as shipzone from '../ts/index';
let testShipzone: shipzone.ShipZone;
tap.test('should create a valid instance of shipzone', async () => {
console.log('hey');
testShipzone = new shipzone.ShipZone();
expect(testShipzone).to.be.instanceof(shipzone.ShipZone);
});
tap.test('should connect to servezone', async () => {
testShipzone.szConnection;
});
tap.start();
示例4: async
import { expect, tap } from 'tapbundle';
import * as npmgInstall from '../ts/tools.install';
import * as smartenv from 'smartenv';
let environment = new smartenv.Smartenv();
tap.test("should install default list globally when parsed 'default' as argument", async () => {
await npmgInstall.install('default');
});
tap.start();
示例5: async
import { tap, expect } from 'tapbundle'
import * as billtoday from '../ts/index'
tap.test('should create a valid Invoice', async () => {
})
tap.start()
示例6: async
import * as smarterror from '../ts/index';
import { expect, tap } from 'tapbundle';
let originalError: smarterror.SmartError;
tap.test('should create a valid error', async () => {
originalError = new smarterror.SmartError('wow');
expect(originalError).to.be.instanceof(Error);
console.log(originalError.cleanFullStack);
});
tap.test('should accept another error as cause', async () => {
let anotherError = new smarterror.SmartError('this is another Error', originalError);
console.log(anotherError.cleanFullStack);
})
tap.start();