Updated comments

This commit is contained in:
jamelreid 2022-01-12 18:27:35 -05:00
parent cb3dee07ee
commit 60630d19a2
1 changed files with 3 additions and 5 deletions

View File

@ -95,19 +95,17 @@ const resolvePackagePath = ( filename, packageName = '' ) => {
/**
* Removes duplicates from a file path in order to allow backwards support for executing tests commands
* that prepend `plugins/woocommerce` and/or `tests/e2e.
* that prepend `plugins/woocommerce` and/or `tests/e2e`.
*
* @param {string} filePath Path to a specific test file
* @param {Array} exclude An array of strings that won't be removed in the event that duplicates exist
* @param {Array} exclude An array of strings that won't be removed in the event that duplicates exist.
* @return {string}
*/
const removePathDuplicates = ( filePath, exclude = [ 'woocommerce' ] ) => {
const { SMOKE_TEST_URL } = process.env;
let prunedPath;
/**
* Removes 'plugins/woocommerce/' from path only tests against a smoke test site.
*/
// Removes 'plugins/woocommerce/' from path only for tests against a smoke test site.
if ( SMOKE_TEST_URL ) {
prunedPath = filePath.replace( 'plugins/woocommerce/', '' );
} else {