mirror of
https://github.com/web-infra-dev/midscene.git
synced 2025-07-13 12:01:09 +00:00
16 lines
413 B
TypeScript
16 lines
413 B
TypeScript
![]() |
import { getRunningPkgInfo } from '@/fs';
|
||
|
import { describe, expect, it } from 'vitest';
|
||
|
|
||
|
describe('fs', () => {
|
||
|
it('getRunningPkgInfo', () => {
|
||
|
const info = getRunningPkgInfo();
|
||
|
expect(info).toBeDefined();
|
||
|
expect(info?.dir).toMatch(/shared$/);
|
||
|
});
|
||
|
|
||
|
it('getRunningPkgInfo - no package.json', () => {
|
||
|
const info = getRunningPkgInfo('/home');
|
||
|
expect(info?.dir).toEqual('/home');
|
||
|
});
|
||
|
});
|