本文整理汇总了TypeScript中nodeunit.Test类的典型用法代码示例。如果您正苦于以下问题:TypeScript Test类的具体用法?TypeScript Test怎么用?TypeScript Test使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Test类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: testCrazyhouse
export function testCrazyhouse(test: Test) {
var fen = 'r4b1N~/1ppk1P2/p1b5/6p1/8/1PBPPq2/P1PR1P2/1K4N1/PNBRPPPrqnn b - - 71 36';
test.equal(pv2san('crazyhouse', fen, false, 'N@a3 b1b2 R@b1'.split(' '), -2), '36... N@a3+ 37. Kb2 R@b1#');
test.done();
}
开发者ID:lexisvar,项目名称:lila,代码行数:5,代码来源:pv2san.ts
示例2: testKingMove
export function testKingMove(test: Test) {
test.equal(pv2san('standard', initialFen, false, 'e2e4 e7e5 e1e2'.split(' ')), '1. e4 e5 2. Ke2');
test.done();
}
开发者ID:lexisvar,项目名称:lila,代码行数:4,代码来源:pv2san.ts
示例3:
'getNavigation returns td.output.NavigationItem in which all url extensions are replaced with .md': (test: Test) => {
// stub super method
const original = td.output.DefaultTheme.prototype.getNavigation;
td.output.DefaultTheme.prototype.getNavigation = () => {
return {
title: 'title',
url: 'a.html',
dedicatedUrls: [
'b.html',
'c.html#1',
'd.html'
],
parent: null,
children: [
{
title: 'title',
url: 'e.html#2',
dedicatedUrls: [
'f.html',
'g.html#3'
],
parent: null,
children: [
{
title: 'title',
url: 'h.html',
dedicatedUrls: [
'i.html#4'
],
parent: null,
children: [],
cssClasses: 'bar',
isLabel: true,
isVisible: true,
isCurrent: true,
isGlobals: true,
isInPath: true
}
],
cssClasses: 'bar',
isLabel: true,
isVisible: true,
isCurrent: true,
isGlobals: true,
isInPath: true
},
{
title: 'title',
url: 'j.html#5',
dedicatedUrls: [
'k.html#6',
'l.html',
'm.html',
'n.html#7'
],
parent: null,
children: null,
cssClasses: 'bar',
isLabel: true,
isVisible: true,
isCurrent: true,
isGlobals: true,
isInPath: true
}
],
cssClasses: 'foo bar',
isLabel: true,
isVisible: true,
isCurrent: true,
isGlobals: true,
isInPath: true
};
};
test.deepEqual(
MarkdownTheme.prototype.getNavigation(null),
{
title: 'title',
url: 'a.md',
dedicatedUrls: [
'b.md',
'c.md#1',
'd.md'
],
parent: null,
children: [
{
title: 'title',
url: 'e.md#2',
dedicatedUrls: [
'f.md',
'g.md#3'
],
parent: null,
children: [
{
title: 'title',
url: 'h.md',
dedicatedUrls: [
'i.md#4'
//.........这里部分代码省略.........
开发者ID:doktordirk,项目名称:typedoc-markdown-theme,代码行数:101,代码来源:theme_test.ts
示例4: function
'the karma export should be present': function(test: Test) {
test.ok(publishModule['preprocessor:typescript']);
test.done();
}
开发者ID:matthewjh,项目名称:karma-ts-preprocessor,代码行数:4,代码来源:publish.test.ts
注:本文中的nodeunit.Test类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论