mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	refactor: forkでデフォルトのノート文字数を変更した場合、E2Eテストが落ちる問題を修正する (#11366)
* forkでデフォルトのノート文字数を変更した場合このテストが落ちる問題を修正する * 文字数についてのコメントを追加しておく
This commit is contained in:
		
							parent
							
								
									78b502bcab
								
							
						
					
					
						commit
						5083458071
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue