当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript tap.test方法代码示例

本文整理汇总了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!')
  }
  
})
开发者ID:pushrocks,项目名称:smartenv,代码行数:30,代码来源:test.ts

示例2: require

import { tap, expect } from 'tapbundle'

import coreflow = require('../dist/index')

tap.test('should startup correctly', async () => {
  coreflow.start()
})

tap.start()
开发者ID:pushrocks,项目名称:coreflow,代码行数:9,代码来源:test.ts

示例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();
开发者ID:shipzone,项目名称:shipzone,代码行数:16,代码来源:test.ts

示例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();
开发者ID:GitZoneTools,项目名称:npmg,代码行数:12,代码来源:test.ts

示例5: async

import { tap, expect } from 'tapbundle'
import * as billtoday from '../ts/index'


tap.test('should create a valid Invoice', async () => {
})

tap.start()
开发者ID:billtoday,项目名称:bts,代码行数:8,代码来源:test.ts

示例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();
开发者ID:pushrocks,项目名称:smarterror,代码行数:17,代码来源:test.ts


注:本文中的tapbundle.tap.test方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。