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