chore: sync backend and deployment changes

This commit is contained in:
2026-05-25 17:25:52 +09:00
parent d38d022872
commit fb5ec649cd
58 changed files with 17575 additions and 378 deletions

View File

@@ -1,6 +1,6 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { resolveStaticContentType } from './chat.js';
import { resolveStaticContentType, shouldAutoCompleteShareReplyParentVerification } from './chat.js';
test('resolveStaticContentType returns html content type for chat resource html files', () => {
assert.equal(resolveStaticContentType('/tmp/sample.html'), 'text/html; charset=utf-8');
@@ -11,3 +11,41 @@ test('resolveStaticContentType keeps plain text content type for code resources'
assert.equal(resolveStaticContentType('/tmp/sample.ts'), 'text/plain; charset=utf-8');
assert.equal(resolveStaticContentType('/tmp/sample.diff'), 'text/plain; charset=utf-8');
});
test('shouldAutoCompleteShareReplyParentVerification only completes answered requests that are not already verified', () => {
assert.equal(
shouldAutoCompleteShareReplyParentVerification({
responseMessageId: 101,
responseText: '',
manualVerificationCompletedAt: null,
}),
true,
);
assert.equal(
shouldAutoCompleteShareReplyParentVerification({
responseMessageId: null,
responseText: '답변 본문',
manualVerificationCompletedAt: null,
}),
true,
);
assert.equal(
shouldAutoCompleteShareReplyParentVerification({
responseMessageId: null,
responseText: '',
manualVerificationCompletedAt: null,
}),
false,
);
assert.equal(
shouldAutoCompleteShareReplyParentVerification({
responseMessageId: 102,
responseText: '답변 본문',
manualVerificationCompletedAt: '2026-05-24T06:00:00.000Z',
}),
false,
);
});