當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript fuse-test-runner.should函數代碼示例

本文整理匯總了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;未經允許,請勿轉載。