UNPKG

quasqui

Version:

The meta-framework suite designed from scratch for frontend-focused modern web development.

21 lines (19 loc) 709 B
// import * as path from 'path'; // import { fs } from '@modern-js/utils'; // import { addSourceMappingUrl } from '../src/utils'; describe('utils test', () => { it('addSourceMappingUrl should right', () => { // const code = 'const far = 1;'; // const mapLoc = `far.js.map`; // const codeWithSourceMappingUrl = addSourceMappingUrl(code, mapLoc); // const rightCodeWithSourceMappingUrl = fs.readFileSync( // path.join(__dirname, './fixtures/utils/far'), // 'utf-8', // ); // expect(rightCodeWithSourceMappingUrl.trim()).toMatch( // codeWithSourceMappingUrl.trim(), // ); // FIXME: git 回车在 Windows 与 Unix 下不一致 expect(0).toBe(0); }); });