rerumaccusamus
Version:
The meta-framework suite designed from scratch for frontend-focused modern web development.
17 lines (14 loc) • 447 B
text/typescript
import path from 'path';
import { ensureAbsolutePath } from '../src/ensureAbsolutePath';
describe('ensure absolute file path', () => {
test('should return filePath directly', () => {
expect(
path.isAbsolute(ensureAbsolutePath('/a/b', '/a/b/c/d/e.jsx')),
).toBeTruthy();
});
test(`should resolve absolute path`, () => {
expect(
path.isAbsolute(ensureAbsolutePath('/a/b', 'c/d/e.jsx')),
).toBeTruthy();
});
});