
const TestBuffer = artifacts.require("TestBuffer");

[TestBuffer].forEach(function(testsuite) {
  
  contract(testsuite.contractName, function(accounts) {
    let instance;
    before(async () => {
      instance = await testsuite.new();
    });
    for(const a of testsuite.abi) {
      if(a.name.startsWith('test')) {
        it(a.name, async () => {
          await instance[a.name]();
        });
      }
    }
  });
});

@@ -51,87 +51,25 @@
 );%0A%0A
-%5BTestBuffer%5D.forEach(function(testsuite) %7B%0A  %0A  contract(testsuite.contractName
+contract('Buffer'
 , fu
@@ -89,18 +89,16 @@
 ts) %7B%0A  
-  
 let inst
@@ -103,18 +103,16 @@
 stance;%0A
-  
   before
@@ -130,18 +130,16 @@
 %3E %7B%0A    
-  
 instance
@@ -151,25 +151,26 @@
 ait 
-testsuite
+TestBuffer
 .new();%0A
     
@@ -165,26 +165,22 @@
 .new();%0A
-  
   %7D);%0A
-  
   for(co
@@ -192,25 +192,26 @@
  of 
-testsuite
+TestBuffer
 .abi) %7B%0A
     
@@ -202,26 +202,24 @@
 ffer.abi) %7B%0A
-  
     if(a.nam
@@ -248,18 +248,16 @@
 %7B%0A      
-  
 it(a.nam
@@ -273,18 +273,16 @@
 () =%3E %7B%0A
-  
         
@@ -317,33 +317,21 @@
     
-  
 %7D);%0A
-      %7D%0A
     %7D%0A
+
   %7D
-);
 %0A%7D);

Test single test contract