You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mercury-parser/src/test-helpers.js

10 lines
209 B
JavaScript

import assert from 'assert';
export function clean(string) {
return string.trim().replace(/\r?\n|\r/g, '').replace(/\s+/g, ' ');
}
export function assertClean(a, b) {
assert.equal(clean(a), clean(b));
}