Skip to content

Commit

Permalink
changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
endiliey committed Nov 8, 2019
1 parent 75aa284 commit 57f49ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG-2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## Unreleased
- More efficient hot reload & consistent generated file.
- Set babel `compact` options to `true` which removes "superfluous whitespace characters and line terminators.
- Skip fileHash caching on production calculation to improve build performance. The runtime cache is only useful in development.
- Obtain git timestamp for `showLastUpdateAuthor`/ `showLastUpdateTime` asynchronously instead of synchronously. This improves build performance greatly.

## 2.0.0-alpha.33

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@ describe('lastUpdate', () => {

test('non-existing file', async () => {
const consoleMock = jest.spyOn(console, 'error');
consoleMock.mockImplementationOnce(err => {
expect(err).toMatchInlineSnapshot(
`[Error: Command failed with exit code 128: git log -1 --format=%ct, %an /mnt/c/Users/endij/Desktop/Linux/Docusaurus/packages/docusaurus-plugin-content-docs/src/__tests__/__fixtures__/.nonExisting]`,
);
});
consoleMock.mockImplementation();
const nonExistingFilePath = path.join(
__dirname,
'__fixtures__',
'.nonExisting',
);
expect(await lastUpdate(nonExistingFilePath)).toBeNull();
expect(consoleMock).toHaveBeenCalledTimes(1);
expect(consoleMock).toHaveBeenCalledWith(
new Error(
`Command failed with exit code 128: git log -1 --format=%ct, %an ${nonExistingFilePath}`,
),
);
expect(await lastUpdate(null)).toBeNull();
expect(await lastUpdate(undefined)).toBeNull();
consoleMock.mockRestore();
Expand Down

0 comments on commit 57f49ff

Please sign in to comment.