本文整理匯總了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');
});