summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/backend/test/e2e/note.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/backend/test/e2e/note.ts b/packages/backend/test/e2e/note.ts
index 33da811a26..39a296f1aa 100644
--- a/packages/backend/test/e2e/note.ts
+++ b/packages/backend/test/e2e/note.ts
@@ -5,6 +5,7 @@ import { Note } from '@/models/entities/Note.js';
import { signup, post, uploadUrl, startServer, initTestDb, api, uploadFile } from '../utils.js';
import type { INestApplicationContext } from '@nestjs/common';
import type * as misskey from 'misskey-js';
+import { MAX_NOTE_TEXT_LENGTH } from '@/const.js';
describe('Note', () => {
let app: INestApplicationContext;
@@ -164,7 +165,7 @@ describe('Note', () => {
test('文字数ぎりぎりで怒られない', async () => {
const post = {
- text: '!'.repeat(3000),
+ text: '!'.repeat(MAX_NOTE_TEXT_LENGTH), // 3000文字
};
const res = await api('/notes/create', post, alice);
assert.strictEqual(res.status, 200);
@@ -172,7 +173,7 @@ describe('Note', () => {
test('文字数オーバーで怒られる', async () => {
const post = {
- text: '!'.repeat(3001),
+ text: '!'.repeat(MAX_NOTE_TEXT_LENGTH + 1), // 3001文字
};
const res = await api('/notes/create', post, alice);
assert.strictEqual(res.status, 400);