mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-02 11:47:23 +02:00
test: fix Windows test for gitUtils (#6951)
* test: fix Windows test for gitUtils * change this * fix
This commit is contained in:
parent
5ee7e8c48e
commit
c696dc2cd6
2 changed files with 9 additions and 4 deletions
|
@ -23,6 +23,12 @@ function createTempRepo() {
|
|||
stderr: ${res.stderr}
|
||||
stdout: ${res.stdout}`);
|
||||
}
|
||||
// Doesn't matter currently
|
||||
shell.exec('git config user.email "test@jc-verse.com"', {
|
||||
cwd: dir,
|
||||
silent: true,
|
||||
});
|
||||
shell.exec('git config user.name "Test"', {cwd: dir, silent: true});
|
||||
}
|
||||
commit(msg: string, date: string, author: string) {
|
||||
const addRes = shell.exec('git add .', {cwd: this.dir, silent: true});
|
||||
|
@ -30,10 +36,7 @@ stdout: ${res.stdout}`);
|
|||
`git commit -m "${msg}" --date "${date}T00:00:00Z" --author "${author}"`,
|
||||
{
|
||||
cwd: this.dir,
|
||||
env: {
|
||||
GIT_COMMITTER_DATE: `${date}T00:00:00Z`,
|
||||
GIT_COMMITTER_NAME: author,
|
||||
},
|
||||
env: {GIT_COMMITTER_DATE: `${date}T00:00:00Z`},
|
||||
silent: true,
|
||||
},
|
||||
);
|
||||
|
|
|
@ -53,6 +53,8 @@ export function getFileCommitDate(
|
|||
);
|
||||
}
|
||||
|
||||
// Commit time and author name; not using author time so that amended commits
|
||||
// can have their dates updated
|
||||
let formatArg = '--format=%ct';
|
||||
if (includeAuthor) {
|
||||
formatArg += ',%an';
|
||||
|
|
Loading…
Add table
Reference in a new issue