本文整理汇总了TypeScript中fuse-test-runner.should函数的典型用法代码示例。如果您正苦于以下问题:TypeScript should函数的具体用法?TypeScript should怎么用?TypeScript should使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了should函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: Codon
public "codon.setCodon should set a new codon"() {
const cod1 = new Codon(RNA.G, RNA.C, RNA.C);
const cod1AA = Codon.matchCodon(cod1);
const expectedCod1 = "Ala";
should(cod1AA).equal(expectedCod1);
cod1.setCodon(RNA.U, RNA.U, RNA.A);
const cod1AA2 = Codon.matchCodon(cod1);
const expectedCod2 = "Leu";
should(cod1AA2).equal(expectedCod2);
}
开发者ID:AngelMunoz,项目名称:DRPTranslator,代码行数:10,代码来源:Codon.test.ts
示例2: RNATranslator
public "findStops should return an array with the index of stop sequences"() {
const rnaTrans = new RNATranslator();
const threeStops = "UAAUUGCUUUAGAAUUGA"; // 0, 9, 15
const fiveStops = "UAAUUGCUUUAGAAUUGACUUAUAUAAUAGUGA"; // 0, 9, 15, 24, 27,30
const oneStop = "UAAUUGCUUUGGAAUUCA"; // 0
const noneStop = "UACGCGCGCAUCCGCG"; // []
const expectedThree = [0, 9, 15];
const expectedFive = [0, 9, 15, 24, 27, 30];
const expectedOne = [0];
const expectedNone = [];
should(rnaTrans.findStops(threeStops)).deepEqual(expectedThree);
should(rnaTrans.findStops(fiveStops)).deepEqual(expectedFive);
should(rnaTrans.findStops(oneStop)).deepEqual(expectedOne);
should(rnaTrans.findStops(noneStop)).deepEqual(expectedNone);
}
开发者ID:AngelMunoz,项目名称:DRPTranslator,代码行数:15,代码来源:rna.translator.test.ts
示例3: DNATranslator
public "transDNAtoDNA should return the matching complementary DNA sequence"() {
const dnaTrans = new DNATranslator();
const dnaSeq = "ATGCCAGTCGATCG";
const expectedDnaSeq = "TACGGTCAGCTAGC";
const transDnaSeq = dnaTrans.transDNAtoOpositeDNA(dnaSeq);
should(transDnaSeq).equal(expectedDnaSeq);
}
开发者ID:AngelMunoz,项目名称:DRPTranslator,代码行数:7,代码来源:dna.translator.test.ts
注:本文中的fuse-test-runner.should函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论