Skip to content
Snippets Groups Projects
Unverified Commit 50834580 authored by 猫ロキP@deflis's avatar 猫ロキP@deflis Committed by GitHub
Browse files

refactor: forkでデフォルトのノート文字数を変更した場合、E2Eテストが落ちる問題を修正する (#11366)

* forkでデフォルトのノート文字数を変更した場合このテストが落ちる問題を修正する

* 文字数についてのコメントを追加しておく
parent 78b502bc
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment