Reject unsupported Reddit chat capabilities
This commit is contained in:
1 parent
8d932fcf36
commit
712226cd43
8 files changed
+100
-8
No files matched your search
@@ -1,5 +1,8 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { isSafeOutboundMessage } from '../src/services/outbound-message-safety.js';
|
||||
import {
|
||||
isSafeOutboundMessage,
|
||||
isSafeRedditChatMessage,
|
||||
} from '../src/services/outbound-message-safety.js';
|
||||
|
||||
describe('outbound message location safety', () => {
|
||||
it.each([
|
||||
@@ -29,3 +32,23 @@ describe('outbound message location safety', () => {
|
||||
expect(isSafeOutboundMessage(message)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Reddit chat capability safety', () => {
|
||||
it.each([
|
||||
'I could send you a voice note if you want.',
|
||||
'Send me an audio message?',
|
||||
'We should hop on a call.',
|
||||
'Fancy a video call later?',
|
||||
'We could FaceTime tonight.',
|
||||
])('rejects unsupported private-chat capabilities: %s', (message) => {
|
||||
expect(isSafeRedditChatMessage(message)).toBe(false);
|
||||
});
|
||||
|
||||
it.each([
|
||||
'Tell me more here, I want to hear the whole story.',
|
||||
'Want me to send you a saved pic?',
|
||||
'What song have you had on repeat lately?',
|
||||
])('allows text and approved picture conversation: %s', (message) => {
|
||||
expect(isSafeRedditChatMessage(message)).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user