本文整理汇总了TypeScript中power-assert类的典型用法代码示例。如果您正苦于以下问题:TypeScript power-assert类的具体用法?TypeScript power-assert怎么用?TypeScript power-assert使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了power-assert类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it ('add cell', () => {
var list = new List();
list.add(10);
assert(list.get(0) === 10);
});
示例2: glob
glob('./.tmp/generated/**/*.md', (err, fileNames) => {
assert(fileNames.length === 0);
done();
});
示例3: Future
return Future(() => 1).flatMap(x => Future(() => x + 1)).promise.then(x => assert(x === 2));
示例4: hello
it("generate string with parameter", () => {
let str = hello("JavaScript");
assert(str === "Hello, JavaScript");
});
示例5: it
it('should be return new instance', () => {
assert(post instanceof Post)
})
示例6: assert
c.once('shiba:return-lint-rule-url', (_: any, url: string) => {
assert(url.indexOf('http') === 0);
done();
});
示例7: it
it(`extracts "endpoint" from ${name}`, () => {
assert(GitHubApi.extractEndpoint(url) === "https://api.github.com");
});
示例8: assert
}, done, (x) => {
assert(x === 3)
done()
})