require('source-map-support').install()
const isAbsolute = require('./_isAbsolute')
const istanbul = require('istanbul')
const path = require('path')
const {tape} = require('substance-test')

tape.onFinish(() => {
  let reporter = new istanbul.Reporter()
  let collector = new istanbul.Collector()
  collector.add(global.__coverage__)
  reporter.add('lcov')
  reporter.write(collector, true, () => {})
})

let testFile = process.argv[2]
require(testFile)

@@ -147,19 +147,101 @@
 h')%0A
-const %7B
+%0A// HACK: register to all 'tape' variants as we find them%0A%0Alet tapes = %5B%5D%0Atry %7B%0A  let %7B 
 tape
+ 
 %7D = 
@@ -262,17 +262,169 @@
 ance
--test')%0A%0A
+Tape')%0A  if (tape) tapes.push(tape)%0A%7D catch(err) %7B%7D%0Atry %7B%0A  let tape = require('tape')%0A  if (tape) tapes.push(tape)%0A%7D catch(err) %7B%7D%0A%0Atapes.forEach((tape) =%3E %7B%0A  
 tape
@@ -441,16 +441,18 @@
 () =%3E %7B%0A
+  
   let re
@@ -484,16 +484,18 @@
 orter()%0A
+  
   let co
@@ -529,16 +529,18 @@
 ector()%0A
+  
   collec
@@ -568,16 +568,18 @@
 rage__)%0A
+  
   report
@@ -593,16 +593,18 @@
 'lcov')%0A
+  
   report
@@ -639,16 +639,21 @@
  =%3E %7B%7D)%0A
+  %7D)%0A
 %7D)%0A%0Alet 

Make coverage util applicable for tape tests.