28 lines
1.2 KiB
TypeScript
28 lines
1.2 KiB
TypeScript
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',
|
|
});
|
|
});
|
|
});
|