Skip to content

Commit

Permalink
grrr
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpchen committed Sep 23, 2024
1 parent 1b659b7 commit dd5940f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/services/SidebarService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class SidebarService implements ISidebarService {
'--diff-filter=A',
'--format="%cI"',
'--',
`'${path.join(documentRoot().fullName, file)}'`,
`'${path.join(documentRoot().fullName, file)}.md'`,
]).stdout.toString(),
);
console.log(foo);
Expand Down
20 changes: 9 additions & 11 deletions docs/test/firstTrackedDate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ import { basename, dirname } from 'node:path';
import * as fs from 'node:fs';
import { expect, test } from 'vitest';
import path from 'node:path';
import { projectRoot } from '../shared/FileSystem';
import { documentRoot, projectRoot } from '../shared/FileSystem';

// test('expect date', () => {
// const foo = spawnSync('git', [
// 'log',
// '-1',
// '--pretty="%ai"',
// path.join(projectRoot().fullName, 'package.json'),
// ]).stdout.toString();
// expect(foo.startsWith('2024')).toBe(true);
// });
test('', () => {
expect(projectRoot().parent?.fullName).toBe('/home/sharpchen/desktop/repo/sharpchen.github.io');
const foo = spawnSync('git', [
'log',
'--diff-filter=A',
'--format="%cI"',
'--',
`'${path.join(documentRoot().fullName, 'docs/test/firstTrackedDate.test.ts')}'`,
]).stdout.toString();
expect(foo.startsWith('2024')).toBe(true);
});

0 comments on commit dd5940f

Please sign in to comment.