chore: 著作権とライセンスについての情報を各ファイルに追加する (#141)
* chore: 著作権とライセンスについての情報を各ファイルに追加する * chore: Add the SPDX information to each file Add copyright and licensing information as defined in version 3.0 of the REUSE Specification. * tweak format --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> * chore: Add SPDX-License-Identifier [skip ci] * add missing SPDX-License-Identifier * remove unused file --------- Co-authored-by: Shun Sakai <sorairolake@protonmail.ch> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> Co-authored-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
This commit is contained in:
		| @@ -1,11 +1,16 @@ | ||||
| /* | ||||
|  * SPDX-FileCopyrightText: syuilo and other misskey contributors | ||||
|  * SPDX-License-Identifier: AGPL-3.0-only | ||||
|  */ | ||||
|  | ||||
| process.env.NODE_ENV = 'test'; | ||||
|  | ||||
| import * as assert from 'assert'; | ||||
| import { Note } from '@/models/entities/Note.js'; | ||||
| import { MAX_NOTE_TEXT_LENGTH } from '@/const.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; | ||||
| @@ -547,8 +552,8 @@ describe('Note', () => { | ||||
| 		test('センシティブな投稿はhomeになる (単語指定)', async () => { | ||||
| 			const sensitive = await api('admin/update-meta', { | ||||
| 				sensitiveWords: [ | ||||
| 					"test", | ||||
| 				] | ||||
| 					'test', | ||||
| 				], | ||||
| 			}, alice); | ||||
|  | ||||
| 			assert.strictEqual(sensitive.status, 204); | ||||
| @@ -561,14 +566,13 @@ describe('Note', () => { | ||||
|  | ||||
| 			assert.strictEqual(note1.status, 200); | ||||
| 			assert.strictEqual(note1.body.createdNote.visibility, 'home'); | ||||
|  | ||||
| 		}); | ||||
|  | ||||
| 		test('センシティブな投稿はhomeになる (正規表現)', async () => { | ||||
| 			const sensitive = await api('admin/update-meta', { | ||||
| 				sensitiveWords: [ | ||||
| 					"/Test/i", | ||||
| 				] | ||||
| 					'/Test/i', | ||||
| 				], | ||||
| 			}, alice); | ||||
|  | ||||
| 			assert.strictEqual(sensitive.status, 204); | ||||
| @@ -584,8 +588,8 @@ describe('Note', () => { | ||||
| 		test('センシティブな投稿はhomeになる (スペースアンド)', async () => { | ||||
| 			const sensitive = await api('admin/update-meta', { | ||||
| 				sensitiveWords: [ | ||||
| 					"Test hoge" | ||||
| 				] | ||||
| 					'Test hoge', | ||||
| 				], | ||||
| 			}, alice); | ||||
|  | ||||
| 			assert.strictEqual(sensitive.status, 204); | ||||
| @@ -596,7 +600,6 @@ describe('Note', () => { | ||||
|  | ||||
| 			assert.strictEqual(note2.status, 200); | ||||
| 			assert.strictEqual(note2.body.createdNote.visibility, 'home'); | ||||
|  | ||||
| 		}); | ||||
| 	}); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 riku6460
					riku6460