Skip to content

Commit

Permalink
(#33) - Remove portfinder package
Browse files Browse the repository at this point in the history
The package did not solve the problem with ports collision.
  • Loading branch information
marcos8896 committed Sep 7, 2018
1 parent b6f9712 commit 2e734cf
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions dev/testing/environment-utils.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
'use strict';

const portfinder = require( 'portfinder' );

/**
* Contain shared functions to set the testing environment
* properly.
* @author Marcos Barrera del Río <elyomarcos@gmail.com>
* @module Testing/Enviroment-utils
*/

/**
* Find an available port.
*
* @author Marcos Barrera del Río <elyomarcos@gmail.com>
* @returns {Promise<Number>} Returns a promise which contains
* an available port number.
*/
const getFreePort = () => portfinder.getPortPromise();

/**
* Compose the baseURL for the testing environment by adding
* the `TEST_API_HOST` to a given port.
Expand Down Expand Up @@ -59,7 +48,6 @@ const createTestingDatabase = () => {
if ( process.env.NODE_ENV === 'test' ) {

module.exports = {
getFreePort,
getBaseURLWithPort,
createTestingDatabase,
};
Expand Down

0 comments on commit 2e734cf

Please # to comment.