woocommerce/tests/e2e/env/utils/app-name.js

21 lines
416 B
JavaScript
Raw Normal View History

2020-10-21 17:25:13 +00:00
/**
* External dependencies
*/
const path = require( 'path' );
/**
* Internal dependencies
*/
const getTestConfig = require( './test-config' );
const getAppRoot = require( './app-root' );
const getAppName = () => {
const testConfig = getTestConfig();
if ( testConfig.appName ) {
return testConfig.appName;
}
const appRoot = getAppRoot();
return path.basename( appRoot );
};
module.exports = getAppName;