Fix commenter-targeted outreach attribution
This commit is contained in:
1 parent
b5304e24e3
commit
f77157d303
19 files changed
+328
-49
No files matched your search
@@ -0,0 +1,27 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { validateCommentTargetedOpener } from '../src/services/comment-targeted-opener.js';
|
||||
|
||||
describe('validateCommentTargetedOpener', () => {
|
||||
it('accepts an opener grounded in the expressed experience', () => {
|
||||
expect(validateCommentTargetedOpener(
|
||||
'I saw your comment about wishing that was you being pinned down. What part of that idea gets to you most?',
|
||||
)).toEqual({ safe: true });
|
||||
});
|
||||
|
||||
it.each([
|
||||
'Your tits look incredible in that shot, I saw your comment.',
|
||||
'You look so good kneeling there, your comment caught my eye.',
|
||||
'I saw your comment. Send me another photo like that.',
|
||||
'Your post caught my eye and I liked what you said.',
|
||||
'I saw your comment. What made you decide to look up at the camera like that?',
|
||||
])('rejects source-image attribution: %s', (message) => {
|
||||
expect(validateCommentTargetedOpener(message).safe).toBe(false);
|
||||
});
|
||||
|
||||
it('rejects an image-only opener even when it avoids explicit anatomy', () => {
|
||||
expect(validateCommentTargetedOpener('That scene is incredibly hot.')).toEqual({
|
||||
safe: false,
|
||||
reason: 'does not ground the opener in what the commenter expressed',
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user