From 274d939eb61d772d575b4d79253026b8e52063b8 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Tue, 14 May 2019 15:12:21 -0400 Subject: [PATCH] fix(fs): Avoid deprecation errors Node.js no longer allows calling functions without a callback, which is good: it exposes cases where nasty errors are possible. We were not supplying callbacks in some cases, which are now replaced with `Sync` calls. --- test/apiKey.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/apiKey.js b/test/apiKey.js index 82ead18..6330d2f 100644 --- a/test/apiKey.js +++ b/test/apiKey.js @@ -19,7 +19,7 @@ tape( 'api_key not found in config', function ( test ){ delete process.env.PELIAS_CONFIG; // delete temp file - fs.unlink( '/tmp/pelias_temp.json' ); + fs.unlinkSync( '/tmp/pelias_temp.json' ); test.end(); }); @@ -41,7 +41,7 @@ tape( 'stage api_key imported from pelias config', function ( test ){ delete process.env.PELIAS_CONFIG; // delete temp file - fs.unlink( '/tmp/pelias_temp2.json' ); + fs.unlinkSync( '/tmp/pelias_temp2.json' ); test.end(); }); @@ -63,7 +63,7 @@ tape( 'avoid matching partial urls', function ( test ){ delete process.env.PELIAS_CONFIG; // delete temp file - fs.unlink( '/tmp/pelias_temp3.json' ); + fs.unlinkSync( '/tmp/pelias_temp3.json' ); test.end(); });