本文整理汇总了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);
}
示例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);
}
示例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);
}