Hi Dhruv, following up on the runner fix.
' + SIGNATURE);
+
+ assert.equal(detect.scrubRoot(root), 1);
+ assert.match(root.textContent, /following up on the runner fix/);
+ assert.doesNotMatch(root.textContent, /Sender notified by/);
+});
+
+test('clears the blank line Mailsuite leaves above the signature', () => {
+ const root = compose('I have been using
Mailsuite to track replies ' +
+ 'and it works well.
',
+ );
+
+ assert.equal(detect.scrubRoot(root), 0);
+ assert.match(root.textContent, /it works well/);
+ assert.equal(root.querySelectorAll('a').length, 1);
+});
+
+test('a message with no signature is left exactly as it was', () => {
+ const root = compose('Just a normal email.
');
+ const before = root.innerHTML;
+
+ assert.equal(detect.scrubRoot(root), 0);
+ assert.equal(root.innerHTML, before);
+});
+
+test('localised signatures are recognised', () => {
+ for (const phrase of ['Remitente notificado con', 'Absender benachrichtigt von', '送信者への通知']) {
+ const root = compose(
+ `