const tap = require('tap');
const fastly = require('../lib/fastly.js');
const fastly_api_key =  process.env.FASTLY_API_KEY || '';
const content_url =  process.env.CONTENT_URL || '';

var flib = new fastly(fastly_api_key);

// --> .softpurge()
tap.test('.softpurge()', function(t) {
	t.type(flib.softpurge, 'function', 'return function')
	t.end();
});
tap.test('.softpurge.then()', function(t) {
	flib.softpurge(content_url)
		.then((res)=>{
			t.type(res, 'object', 'return object');
			t.end();
		})
		.catch((err)=>{
			t.fail(err);
			t.end();
		})
});
@@ -220,28 +220,8 @@
 );%0A%0A
-// --%3E .softpurge()%0A
 tap.
@@ -309,16 +309,17 @@
 nction')
+;
 %0A%09t.end(
@@ -329,208 +329,4 @@
 %7D);%0A
-tap.test('.softpurge.then()', function(t) %7B%0A%09flib.softpurge(content_url)%0A%09%09.then((res)=%3E%7B%0A%09%09%09t.type(res, 'object', 'return object');%0A%09%09%09t.end();%0A%09%09%7D)%0A%09%09.catch((err)=%3E%7B%0A%09%09%09t.fail(err);%0A%09%09%09t.end();%0A%09%09%7D)%0A%7D);

Update softpurge.js