Переглянути джерело

Changed list name in respective examples.ts and now examples.spec.ts runs without error

yakomaxa 2 роки тому
батько
коміт
9852c9301e

+ 6 - 5
src/mol-script/transpilers/_spec/examples.spec.ts

@@ -9,9 +9,10 @@ import { _transpiler as transpilers } from '../all';
 
 function testTranspilerExamples(name: string, transpiler: Transpiler) {
     describe(`${name} examples`, () => {
-        const examples = require(`../${name}/examples`).default;
+        const examples = require(`../${name}/examples`).examples;
+        //        console.log(examples);
         for (const e of examples) {
-	    console.log(e);
+
             it(e.name, () => {
                 // check if it transpiles and compiles/typechecks.
                 transpiler(e.value);
@@ -21,6 +22,6 @@ function testTranspilerExamples(name: string, transpiler: Transpiler) {
 }
 
 testTranspilerExamples('pymol', transpilers.pymol);
-// testTranspilerExamples('vmd', transpilers.vmd);
-// testTranspilerExamples('jmol', transpilers.jmol);
-// testTranspilerExamples('rasmol', transpilers.rasmol);
+testTranspilerExamples('vmd', transpilers.vmd);
+testTranspilerExamples('jmol', transpilers.jmol);
+testTranspilerExamples('rasmol', transpilers.rasmol);

+ 1 - 1
src/mol-script/transpilers/jmol/examples.ts

@@ -5,7 +5,7 @@
  * @author David Sehnal <david.sehnal@gmail.com>
  */
 
-export const jmolSelectionsExamples = [{
+export const examples = [{
     name: 'Residue 50 or 135',
     value: '50 or 135'
 }, {

+ 1 - 1
src/mol-script/transpilers/pymol/examples.ts

@@ -6,7 +6,7 @@
  * @author Panagiotis Tourlas <panagiot_tourlov@hotmail.com>
  */
 
-export const pymolSelectionsExamples = [{
+export const examples = [{
     name: 'ALA residues',
     value: 'resn ALA'
 }, {

+ 1 - 1
src/mol-script/transpilers/rasmol/examples.ts

@@ -6,7 +6,7 @@
  *
  */
 
-export const rasmolSelectionsExamples = [{
+export const examples = [{
     name: 'Residue 50 or 135',
     value: '(50) or (135)'
 }, {

+ 2 - 2
src/mol-script/transpilers/vmd/examples.ts

@@ -5,7 +5,7 @@
  * @author Panagiotis Tourlas <panagiot_tourlov@hotmail.com>
  */
 
-export const vmdSelectionsExamples = [{
+export const examples = [{
     name: 'All water residues',
     value: 'water'
 }, {
@@ -74,4 +74,4 @@ export const vmdSelectionsExamples = [{
 }/* , {
     name: 'Residues ala, arg, asn, asp, cys, and tyr',
     value: 'resname ALA to CYS TYR'
-}*/];
+}*/];