From 4ebd27726937e46b48d6a1b7e3d25c251a8e8973 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Mon, 11 Feb 2019 12:28:08 -0800 Subject: [PATCH] chore(tests): Add explicit ends to base level tests In a recent release, `tape` fixed a bug (https://github.com/substack/tape/issues/458) which ends up also being a major breaking change. Essentially, any time tests are nested, both the nested and top level tests must call `end()`. This appears to have affected many of our repositories, as we heavily use nested tests. Fixes https://github.com/pelias/microservice-wrapper/issues/33 --- test/ServiceConfiguration.js | 1 + test/index.js | 1 + test/service.js | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/test/ServiceConfiguration.js b/test/ServiceConfiguration.js index bbc92a4..68c760a 100644 --- a/test/ServiceConfiguration.js +++ b/test/ServiceConfiguration.js @@ -89,5 +89,6 @@ tape('ServiceConfiguration tests', (test) => { t.end(); }); + test.end(); }); diff --git a/test/index.js b/test/index.js index 09d5578..d377d49 100644 --- a/test/index.js +++ b/test/index.js @@ -8,4 +8,5 @@ tape('index tests', (test) => { t.equals(typeof index.ServiceConfiguration, 'function'); t.end(); }); + test.end(); }); diff --git a/test/service.js b/test/service.js index 9ba05a2..df695a3 100644 --- a/test/service.js +++ b/test/service.js @@ -19,6 +19,8 @@ tape('service tests', (test) => { t.end(); }); + test.end(); + }); tape('conforms_to tests', (test) => { @@ -31,6 +33,7 @@ tape('conforms_to tests', (test) => { }); + test.end(); }); tape('request logging', (test) => { @@ -123,6 +126,7 @@ tape('request logging', (test) => { }); }); + test.end(); }); @@ -148,6 +152,7 @@ tape('service disabled tests', (test) => { }); }); + test.end(); }); @@ -564,6 +569,7 @@ tape('failure conditions tests', (test) => { }); }); + test.end(); }); @@ -768,6 +774,7 @@ tape('success conditions tests', (test) => { }); }); + test.end(); }); @@ -845,5 +852,5 @@ tape('callback-as-2nd-parameter tests', (test) => { }); }); - + test.end(); });