mirror of
https://github.com/tiktok/sparo.git
synced 2024-11-23 07:38:15 -05:00
chore: fix test
This commit is contained in:
parent
a9a124050b
commit
f55b682f19
2 changed files with 5 additions and 2 deletions
|
@ -20,6 +20,7 @@ export async function runAsync(runScriptOptions: IRunScriptOptions): Promise<voi
|
|||
} = runScriptOptions;
|
||||
|
||||
const temporaryDirectory: string = path.resolve(buildFolderPath, 'temp');
|
||||
logger.terminal.writeLine(`Temporary directory: ${temporaryDirectory}`);
|
||||
const testRepoURL: string = 'https://github.com/tiktok/sparo.git';
|
||||
const testBranch: string = 'test-artifacts/sparo-real-repo-test';
|
||||
const repoFolder: string = path.resolve(temporaryDirectory, 'sparo');
|
||||
|
|
|
@ -285,10 +285,12 @@ function replaceVersionString(text: string): string {
|
|||
return text.replace(/\d+\.\d+\.\d+/g, '__VERSION__');
|
||||
}
|
||||
/**
|
||||
* Replace all "in xx.yy seconds" strings with "in __DURATION__ seconds".
|
||||
* Replace all "in xx.yy seconds" or "in x minute y.z seconds" strings with "in __DURATION__".
|
||||
*/
|
||||
function replaceDurationString(text: string): string {
|
||||
return text.replace(/in \d+(\.\d+)? seconds/g, 'in __DURATION__');
|
||||
return text
|
||||
.replace(/in \d+(\.\d+)? seconds/g, 'in __DURATION__')
|
||||
.replace(/in \d+ minutes? \d+(\.\d+)? seconds/g, 'in __DURATION__');
|
||||
}
|
||||
/**
|
||||
* Replace all "<workingDirectory>" strings with "__WORKING_DIRECTORY__".
|
||||
|
|
Loading…
Reference in a new issue