rerumaccusamus
Version:
The meta-framework suite designed from scratch for frontend-focused modern web development.
22 lines (20 loc) • 506 B
text/typescript
import path from 'path';
import { transformDtsAlias } from '../src/utils/tspaths-transform';
describe('tspaths-transform', () => {
it('transformDtsAlias', () => {
const filepath = path.join(__dirname, 'fixtures/tspaths/a.ts');
const options = {
filenames: [filepath],
baseUrl: './',
paths: {
'@/*': ['./*'],
},
};
expect(transformDtsAlias(options)).toEqual([
{
path: filepath,
content: "import '@/b.ts';",
},
]);
});
});