mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-31 18:07:00 +02:00
test: add tests for gitUtils (#6949)
* test: add tests for gitUtils * debug test * try fix
This commit is contained in:
parent
3c7b39b739
commit
5ee7e8c48e
3 changed files with 194 additions and 19 deletions
|
@ -12,14 +12,12 @@ import {
|
|||
GitNotFoundError,
|
||||
} from '@docusaurus/utils';
|
||||
|
||||
type FileLastUpdateData = {timestamp?: number; author?: string};
|
||||
|
||||
let showedGitRequirementError = false;
|
||||
let showedFileNotTrackedError = false;
|
||||
|
||||
export async function getFileLastUpdate(
|
||||
filePath?: string,
|
||||
): Promise<FileLastUpdateData | null> {
|
||||
): Promise<{timestamp: number; author: string} | null> {
|
||||
if (!filePath) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue