本文整理汇总了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');
});
示例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);
});
示例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
`
);
});
示例4: async
tap.test('expect have a .topLevel', async () => {
expect(testDomain.topLevel).equal('level1D');
});
示例5: async
tap.test('should return a name', async () => {
expect(projectinfo.getNpmNameForDir(testBasePath)).equal('testpackage');
});
示例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');
});
示例7: async
tap.test('expect return a .httpsUrl', async () => {
expect(testGit.httpsUrl).equal('https://github.com/pushrocks/smartstring.git');
});