From a4f47e46ac8bf8fcd5a8d4303cc0704a9721fe17 Mon Sep 17 00:00:00 2001 From: zyoshoka Date: Thu, 11 Jan 2024 22:20:18 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=E3=83=86=E3=82=B9=E3=83=88=E3=81=8C?= =?UTF-8?q?=E3=81=99=E3=81=A7=E3=81=AB=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=81=A7=E8=A8=98=E8=BF=B0=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=9F=E3=81=AE=E3=81=A7=E3=81=9D=E3=81=A3=E3=81=A1=E3=82=92?= =?UTF-8?q?=E4=BD=BF=E3=81=86=E3=81=93=E3=81=A8=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/server/api/endpoints/notes/create.test.ts | 9 ++++----- packages/backend/test/e2e/note.ts | 7 ------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/create.test.ts b/packages/backend/src/server/api/endpoints/notes/create.test.ts index 6086f99c92..0aa05a2c93 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.test.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.test.ts @@ -34,11 +34,10 @@ describe('api:notes/create', () => { .toBe(VALID); }); - // TODO - //test('null post', () => { - // expect(v({ text: null })) - // .toBe(INVALID); - //}); + test('null post', () => { + expect(v({ text: null })) + .toBe(INVALID); + }); test('0 characters post', () => { expect(v({ text: '' })) diff --git a/packages/backend/test/e2e/note.ts b/packages/backend/test/e2e/note.ts index 9a0bf3385f..0f2e08e675 100644 --- a/packages/backend/test/e2e/note.ts +++ b/packages/backend/test/e2e/note.ts @@ -161,13 +161,6 @@ describe('Note', () => { assert.strictEqual(deleteRes.status, 204); }); - test('text: nullのみだと怒られる', async () => { - const res = await api('/notes/create', { - text: null, - }, alice); - assert.strictEqual(res.status, 400); - }); - test('文字数ぎりぎりで怒られない', async () => { const post = { text: '!'.repeat(MAX_NOTE_TEXT_LENGTH), // 3000文字