Remove carriage returns in js-parser tests
MODIFY
packages/@romejs/js-parser/__rtests__/index.ts
packages/@romejs/js-parser/__rtests__/index.ts
@@ -31,7 +31,7 @@ const promise = createFixtureTests((fixture, t) => {
const outputFile = files.get('output.txt');
let outputContent = undefined;
if (outputFile !== undefined) {
- outputContent = outputFile.content.toString();
+ outputContent = outputFile.content.toString().replace(/\r/g, '');
}
const sourceTypeProp = options.get('sourceType');

MODIFY
packages/@romejs/test/fixtures.ts
packages/@romejs/test/fixtures.ts
@@ -115,7 +115,7 @@ async function _getFixtures(opts: {
const fileContents: Map<string, FixtureFile> = new Map();
for (const path of filenames) {
fileContents.set(path.getBasename(), {
- relative: path.relative(dir),
+ relative: dir.relative(path),
absolute: path,
content: await readFile(path),
});

MODIFY
scripts/dev-rome
scripts/dev-rome
@@ -15,12 +15,16 @@ const os = require('os');
const DEV_FOLDER = path.join(os.tmpdir(), 'rome-dev');
+function inverse(str) {
+ return `\u001b[7m ${str} \u001b[27m`;
+}
+
process.env.ROME_CACHE = '0';
unlink(DEV_FOLDER);
fs.mkdirSync(DEV_FOLDER);
-console.log('Building trunk');
+console.log(inverse('Building trunk'));
execNode([
path.join(__dirname, 'vendor/rome.cjs'),
'bundle',
@@ -28,5 +32,5 @@ execNode([
DEV_FOLDER,
]);
-console.log('Executing trunk');
+console.log(inverse('Executing trunk'));
execNode([path.join(DEV_FOLDER, 'index.js'), ...argv]);

Remove carriage returns in js-parser tests