fix compile errors
This commit is contained in:
		
							parent
							
								
									6f5656c729
								
							
						
					
					
						commit
						8e526c23f6
					
				| 
						 | 
				
			
			@ -4,7 +4,7 @@
 | 
			
		|||
 * Tests located in test/chart
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
import * as nestedProperty from 'nested-property';
 | 
			
		||||
const nestedProperty = require('nested-property');
 | 
			
		||||
import autobind from 'autobind-decorator';
 | 
			
		||||
import Logger from '../logger';
 | 
			
		||||
import { Schema } from '../../misc/schema';
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										20
									
								
								test/mute.ts
								
								
								
								
							
							
						
						
									
										20
									
								
								test/mute.ts
								
								
								
								
							| 
						 | 
				
			
			@ -62,8 +62,8 @@ describe('Mute', () => {
 | 
			
		|||
 | 
			
		||||
		assert.strictEqual(res.status, 200);
 | 
			
		||||
		assert.strictEqual(Array.isArray(res.body), true);
 | 
			
		||||
		assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
 | 
			
		||||
		assert.strictEqual(res.body.some(note => note.id === carolNote.id), false);
 | 
			
		||||
		assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), true);
 | 
			
		||||
		assert.strictEqual(res.body.some((note: any) => note.id === carolNote.id), false);
 | 
			
		||||
	}));
 | 
			
		||||
 | 
			
		||||
	it('ミュートしているユーザーからメンションされても、hasUnreadMentions が true にならない', async(async () => {
 | 
			
		||||
| 
						 | 
				
			
			@ -131,9 +131,9 @@ describe('Mute', () => {
 | 
			
		|||
 | 
			
		||||
			assert.strictEqual(res.status, 200);
 | 
			
		||||
			assert.strictEqual(Array.isArray(res.body), true);
 | 
			
		||||
			assert.strictEqual(res.body.some(note => note.id === aliceNote.id), true);
 | 
			
		||||
			assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
 | 
			
		||||
			assert.strictEqual(res.body.some(note => note.id === carolNote.id), false);
 | 
			
		||||
			assert.strictEqual(res.body.some((note: any) => note.id === aliceNote.id), true);
 | 
			
		||||
			assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), true);
 | 
			
		||||
			assert.strictEqual(res.body.some((note: any) => note.id === carolNote.id), false);
 | 
			
		||||
		}));
 | 
			
		||||
 | 
			
		||||
		it('タイムラインにミュートしているユーザーの投稿のRenoteが含まれない', async(async () => {
 | 
			
		||||
| 
						 | 
				
			
			@ -147,9 +147,9 @@ describe('Mute', () => {
 | 
			
		|||
 | 
			
		||||
			assert.strictEqual(res.status, 200);
 | 
			
		||||
			assert.strictEqual(Array.isArray(res.body), true);
 | 
			
		||||
			assert.strictEqual(res.body.some(note => note.id === aliceNote.id), true);
 | 
			
		||||
			assert.strictEqual(res.body.some(note => note.id === bobNote.id), false);
 | 
			
		||||
			assert.strictEqual(res.body.some(note => note.id === carolNote.id), false);
 | 
			
		||||
			assert.strictEqual(res.body.some((note: any) => note.id === aliceNote.id), true);
 | 
			
		||||
			assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), false);
 | 
			
		||||
			assert.strictEqual(res.body.some((note: any) => note.id === carolNote.id), false);
 | 
			
		||||
		}));
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -163,8 +163,8 @@ describe('Mute', () => {
 | 
			
		|||
 | 
			
		||||
			assert.strictEqual(res.status, 200);
 | 
			
		||||
			assert.strictEqual(Array.isArray(res.body), true);
 | 
			
		||||
			assert.strictEqual(res.body.some(notification => notification.userId === bob.id), true);
 | 
			
		||||
			assert.strictEqual(res.body.some(notification => notification.userId === carol.id), false);
 | 
			
		||||
			assert.strictEqual(res.body.some((notification: any) => notification.userId === bob.id), true);
 | 
			
		||||
			assert.strictEqual(res.body.some((notification: any) => notification.userId === carol.id), false);
 | 
			
		||||
		}));
 | 
			
		||||
	});
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,8 +17,8 @@ process.env.NODE_ENV = 'test';
 | 
			
		|||
import * as assert from 'assert';
 | 
			
		||||
import * as childProcess from 'child_process';
 | 
			
		||||
import { async, signup, request, post, uploadFile } from './utils';
 | 
			
		||||
import { Note } from '../built/models/entities/note';
 | 
			
		||||
const initDb = require('../built/db/postgre.js').initDb;
 | 
			
		||||
import { Note } from '../src/models/entities/note';
 | 
			
		||||
import { initDb } from '../src/db/postgre';
 | 
			
		||||
 | 
			
		||||
describe('Note', () => {
 | 
			
		||||
	let p: childProcess.ChildProcess;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -66,8 +66,8 @@ describe('users/notes', () => {
 | 
			
		|||
		assert.strictEqual(res.status, 200);
 | 
			
		||||
		assert.strictEqual(Array.isArray(res.body), true);
 | 
			
		||||
		assert.strictEqual(res.body.length, 2);
 | 
			
		||||
		assert.strictEqual(res.body.some(note => note.id === jpgNote.id), true);
 | 
			
		||||
		assert.strictEqual(res.body.some(note => note.id === jpgPngNote.id), true);
 | 
			
		||||
		assert.strictEqual(res.body.some((note: any) => note.id === jpgNote.id), true);
 | 
			
		||||
		assert.strictEqual(res.body.some((note: any) => note.id === jpgPngNote.id), true);
 | 
			
		||||
	}));
 | 
			
		||||
 | 
			
		||||
	it('ファイルタイプ指定 (jpg or png)', async(async () => {
 | 
			
		||||
| 
						 | 
				
			
			@ -79,8 +79,8 @@ describe('users/notes', () => {
 | 
			
		|||
		assert.strictEqual(res.status, 200);
 | 
			
		||||
		assert.strictEqual(Array.isArray(res.body), true);
 | 
			
		||||
		assert.strictEqual(res.body.length, 3);
 | 
			
		||||
		assert.strictEqual(res.body.some(note => note.id === jpgNote.id), true);
 | 
			
		||||
		assert.strictEqual(res.body.some(note => note.id === pngNote.id), true);
 | 
			
		||||
		assert.strictEqual(res.body.some(note => note.id === jpgPngNote.id), true);
 | 
			
		||||
		assert.strictEqual(res.body.some((note: any) => note.id === jpgNote.id), true);
 | 
			
		||||
		assert.strictEqual(res.body.some((note: any) => note.id === pngNote.id), true);
 | 
			
		||||
		assert.strictEqual(res.body.some((note: any) => note.id === jpgPngNote.id), true);
 | 
			
		||||
	}));
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue