當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript tapbundle.expect函數代碼示例

本文整理匯總了TypeScript中@pushrocks/tapbundle.expect函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript expect函數的具體用法?TypeScript expect怎麽用?TypeScript expect使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了expect函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: async

tap.test('.sshKeys should point to an array of sshKeys', async () => {
  let sshKeyArray = testSshInstance.sshKeys;
  expect(sshKeyArray).be.instanceOf(Array);
  expect(sshKeyArray[0].host).equal('gitlab.com');
  expect(sshKeyArray[1].host).equal('bitbucket.org');
  expect(sshKeyArray[2].host).equal('github.com');
});
開發者ID:pushrocks,項目名稱:smartssh,代碼行數:7,代碼來源:test.ts

示例2: async

tap.test('hrTime Measurement', async () => {
  let earlyHr = new early.HrtMeasurement();
  earlyHr.start();
  await smartdelay.delayFor(1000);
  let measuredTime = earlyHr.stop();
  console.log(measuredTime);
  return expect(measuredTime.milliSeconds).to.be.greaterThan(999);
});
開發者ID:pushrocks,項目名稱:early,代碼行數:8,代碼來源:test.ts

示例3: async

tap.test('should normalize a string', async () => {
  const testString = `
    myawesome string;
      is indented with two spaces
  `;
  const normalizedString = smartstring.normalize.standard(testString);
  expect(normalizedString).to.equal(
    `
myawesome string;
  is indented with two spaces
  `
  );
});
開發者ID:pushrocks,項目名稱:smartstring,代碼行數:13,代碼來源:test.normalize.ts

示例4: async

tap.test('expect have a .topLevel', async () => {
  expect(testDomain.topLevel).equal('level1D');
});
開發者ID:pushrocks,項目名稱:smartstring,代碼行數:3,代碼來源:test.domain.ts

示例5: async

tap.test('should return a name', async () => {
  expect(projectinfo.getNpmNameForDir(testBasePath)).equal('testpackage');
});
開發者ID:pushrocks,項目名稱:projectinfo,代碼行數:3,代碼來源:test.ts

示例6: async

tap.test('expect create a Env Object', async () => {
  let envStringArray = ['VIRTUAL_HOST=sub.domain.tld', 'DEFAULT_HOST=some.domain.com'];
  let envObject: any = smartstring.docker.makeEnvObject(envStringArray);
  expect(envObject.VIRTUAL_HOST).to.equal('sub.domain.tld');
  expect(envObject.DEFAULT_HOST).to.equal('some.domain.com');
});
開發者ID:pushrocks,項目名稱:smartstring,代碼行數:6,代碼來源:test.docker.ts

示例7: async

tap.test('expect return a .httpsUrl', async () => {
  expect(testGit.httpsUrl).equal('https://github.com/pushrocks/smartstring.git');
});
開發者ID:pushrocks,項目名稱:smartstring,代碼行數:3,代碼來源:test.git.ts


注:本文中的@pushrocks/tapbundle.expect函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。