Compare commits
30 Commits
Author | SHA1 | Date |
---|---|---|
Acid Chicken (硫酸鶏) | 70a68045e2 | |
Acid Chicken (硫酸鶏) | a9fc044837 | |
Acid Chicken (硫酸鶏) | d6a4cc872c | |
Acid Chicken (硫酸鶏) | 31a3c4b272 | |
Acid Chicken (硫酸鶏) | 3bdf54164a | |
Acid Chicken (硫酸鶏) | 62fde0587f | |
Acid Chicken (硫酸鶏) | 181f911ec6 | |
Acid Chicken (硫酸鶏) | 609caf2c4b | |
Acid Chicken (硫酸鶏) | f514c1c200 | |
Acid Chicken (硫酸鶏) | 0c0281d51d | |
Acid Chicken (硫酸鶏) | f5972cabb3 | |
Acid Chicken (硫酸鶏) | d22e21c597 | |
Acid Chicken (硫酸鶏) | 7f2b829a89 | |
Acid Chicken (硫酸鶏) | dbc9461070 | |
Acid Chicken (硫酸鶏) | 609d1b5e8b | |
Acid Chicken (硫酸鶏) | 738858f261 | |
Acid Chicken (硫酸鶏) | f71382516a | |
Acid Chicken (硫酸鶏) | 9037cc792a | |
Acid Chicken (硫酸鶏) | 84b66bec6a | |
Acid Chicken (硫酸鶏) | 680b307eb5 | |
Acid Chicken (硫酸鶏) | c45b08d967 | |
Acid Chicken (硫酸鶏) | 2b3c11d8d9 | |
Acid Chicken (硫酸鶏) | 05a7653eb0 | |
Acid Chicken (硫酸鶏) | 48862ef783 | |
Acid Chicken (硫酸鶏) | b2c60fb513 | |
Acid Chicken (硫酸鶏) | be48df62b3 | |
Acid Chicken (硫酸鶏) | e5da1caffd | |
Acid Chicken (硫酸鶏) | b5e2a3bc55 | |
Acid Chicken (硫酸鶏) | 95f0c50c37 | |
Acid Chicken (硫酸鶏) | 4612e4477d |
|
@ -1,20 +1,61 @@
|
|||
version: 2.1
|
||||
|
||||
executors:
|
||||
default:
|
||||
working_directory: /tmp/workspace
|
||||
v11-node12:
|
||||
working_directory: /tmp/605d145e08d777510640c4509145d45489e9b83b3ae630dda16370ce0cb38947
|
||||
docker:
|
||||
- image: misskey/ci:v11-node12
|
||||
- image: circleci/postgres:latest
|
||||
environment:
|
||||
POSTGRES_USER: syuilo
|
||||
POSTGRES_DB: misskey
|
||||
- image: circleci/redis:latest
|
||||
v11-node11:
|
||||
working_directory: /tmp/605d145e08d777510640c4509145d45489e9b83b3ae630dda16370ce0cb38947
|
||||
docker:
|
||||
- image: misskey/ci:v11-node11
|
||||
- image: circleci/redis:latest
|
||||
- image: circleci/postgres:latest
|
||||
docker:
|
||||
working_directory: /tmp/workspace
|
||||
environment:
|
||||
POSTGRES_USER: syuilo
|
||||
POSTGRES_DB: misskey
|
||||
- image: circleci/redis:latest
|
||||
v10-node11:
|
||||
working_directory: /tmp/605d145e08d777510640c4509145d45489e9b83b3ae630dda16370ce0cb38947
|
||||
docker:
|
||||
- image: docker:latest
|
||||
- image: misskey/ci:v10-node11
|
||||
- image: circleci/mongo:latest
|
||||
v10-node11-redis:
|
||||
working_directory: /tmp/605d145e08d777510640c4509145d45489e9b83b3ae630dda16370ce0cb38947
|
||||
docker:
|
||||
- image: misskey/ci:v10-node11
|
||||
- image: circleci/mongo:latest
|
||||
v10-node10:
|
||||
working_directory: /tmp/605d145e08d777510640c4509145d45489e9b83b3ae630dda16370ce0cb38947
|
||||
docker:
|
||||
- image: misskey/ci:v10-node10
|
||||
- image: circleci/mongo:latest
|
||||
- image: circleci/redis:latest
|
||||
v10-node10-redis:
|
||||
working_directory: /tmp/605d145e08d777510640c4509145d45489e9b83b3ae630dda16370ce0cb38947
|
||||
docker:
|
||||
- image: misskey/ci:v10-node10
|
||||
- image: circleci/mongo:latest
|
||||
- image: circleci/redis:latest
|
||||
docker:
|
||||
working_directory: /tmp/605d145e08d777510640c4509145d45489e9b83b3ae630dda16370ce0cb38947
|
||||
docker:
|
||||
- image: misskey/ci:docker
|
||||
|
||||
jobs:
|
||||
build:
|
||||
executor: default
|
||||
nodejs-build:
|
||||
parameters:
|
||||
executor:
|
||||
type: string
|
||||
default: "v11-node12"
|
||||
target:
|
||||
type: string
|
||||
default: "v11"
|
||||
executor: <<parameters.executor>>
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
|
@ -36,13 +77,20 @@ jobs:
|
|||
- run:
|
||||
name: Configure
|
||||
command: |
|
||||
cp .circleci/misskey/default.yml .config
|
||||
cp .circleci/misskey/test.yml .config
|
||||
cp .circleci/<<parameters.executor>>/default.yml .config
|
||||
cp .circleci/<<parameters.executor>>/test.yml .config
|
||||
- run:
|
||||
name: Build
|
||||
command: |
|
||||
yarn build
|
||||
touch yarn.lock
|
||||
excepted="<<parameters.target>>"
|
||||
actual="v$(cat package.json | jq -r '.version' | awk -F. '{print $1}')"
|
||||
if [ $excepted = $actual ]
|
||||
then
|
||||
yarn build
|
||||
touch yarn.lock
|
||||
else
|
||||
echo -e '\033[0;33mBuild Aborted\033[0;39m'
|
||||
fi
|
||||
- save_cache:
|
||||
name: Cache npm packages
|
||||
key: yarn-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "yarn.lock" }}
|
||||
|
@ -52,108 +100,188 @@ jobs:
|
|||
root: .
|
||||
paths:
|
||||
- .
|
||||
test:
|
||||
nodejs-test:
|
||||
parameters:
|
||||
executor:
|
||||
type: string
|
||||
default: "default"
|
||||
default: "v11-node12"
|
||||
target:
|
||||
type: string
|
||||
default: "v11"
|
||||
executor: <<parameters.executor>>
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /tmp/workspace
|
||||
at: /tmp/605d145e08d777510640c4509145d45489e9b83b3ae630dda16370ce0cb38947
|
||||
- run:
|
||||
name: Test
|
||||
command: |
|
||||
yarn test
|
||||
excepted="<<parameters.target>>"
|
||||
actual="v$(cat package.json | jq -r '.version' | awk -F. '{print $1}')"
|
||||
if [ $excepted = $actual ]
|
||||
then
|
||||
yarn run init || echo -e '\033[0;33mInitialization Not Required\033[0;39m'
|
||||
yarn test
|
||||
else
|
||||
echo -e '\033[0;33mTest Aborted\033[0;39m'
|
||||
fi
|
||||
touch yarn.lock
|
||||
- save_cache:
|
||||
name: Cache npm packages
|
||||
key: yarn-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "yarn.lock" }}
|
||||
paths:
|
||||
- node_modules
|
||||
docker:
|
||||
docker-build:
|
||||
parameters:
|
||||
with_deploy:
|
||||
deploy:
|
||||
type: boolean
|
||||
default: false
|
||||
executor: docker
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- setup_remote_docker:
|
||||
docker_layer_caching: true
|
||||
- run:
|
||||
name: Build
|
||||
command: |
|
||||
docker build -t misskey/misskey .
|
||||
- when:
|
||||
condition: <<parameters.with_deploy>>
|
||||
condition: <<parameters.deploy>>
|
||||
steps:
|
||||
- run:
|
||||
name: Deploy
|
||||
command: |
|
||||
if [ "$DOCKERHUB_USERNAME$DOCKERHUB_PASSWORD" ]
|
||||
then
|
||||
apk update && apk add jq
|
||||
docker tag misskey/misskey misskey/misskey:$(cat package.json | jq -r .version)
|
||||
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
|
||||
docker push misskey/misskey
|
||||
else
|
||||
echo -e '\033[0;33mAborted deploying to Docker Hub\033[0;39m'
|
||||
then
|
||||
docker tag misskey/misskey misskey/misskey:$(cat package.json | jq -r .version)
|
||||
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
|
||||
docker push misskey/misskey
|
||||
else
|
||||
echo -e '\033[0;33mDeploy Aborted\033[0;39m'
|
||||
fi
|
||||
docker-ok:
|
||||
executor: docker
|
||||
steps:
|
||||
- run:
|
||||
name: OK
|
||||
command: |
|
||||
echo -e '\033[0;32mOK\033[0;39m'
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
nodejs:
|
||||
jobs:
|
||||
- hold:
|
||||
name: manual-build-trigger
|
||||
type: approval
|
||||
- nodejs-build:
|
||||
name: build-v11-node12
|
||||
executor: v11-node12
|
||||
target: v11
|
||||
filters:
|
||||
branches:
|
||||
ignore: master
|
||||
- build:
|
||||
name: manual-build
|
||||
ignore:
|
||||
- imgbot
|
||||
- l10n_develop
|
||||
- patch/autogen/v10
|
||||
- patch/autogen/v11
|
||||
- nodejs-test:
|
||||
name: test-v11-node12
|
||||
executor: v11-node12
|
||||
target: v11
|
||||
requires:
|
||||
- manual-build-trigger
|
||||
- build-v11-node12
|
||||
- nodejs-build:
|
||||
name: build-v11-node11
|
||||
executor: v11-node11
|
||||
target: v11
|
||||
filters:
|
||||
branches:
|
||||
ignore: master
|
||||
- build:
|
||||
name: auto-build
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
- test:
|
||||
name: manual-test
|
||||
ignore:
|
||||
- imgbot
|
||||
- l10n_develop
|
||||
- patch/autogen/v10
|
||||
- patch/autogen/v11
|
||||
- nodejs-test:
|
||||
name: test-v11-node11
|
||||
executor: v11-node11
|
||||
target: v11
|
||||
requires:
|
||||
- manual-build
|
||||
- build-v11-node11
|
||||
- nodejs-build:
|
||||
name: build-v10-node11
|
||||
executor: v10-node11
|
||||
target: v10
|
||||
filters:
|
||||
branches:
|
||||
ignore: master
|
||||
- test:
|
||||
name: auto-test
|
||||
ignore:
|
||||
- imgbot
|
||||
- l10n_develop
|
||||
- patch/autogen/v10
|
||||
- patch/autogen/v11
|
||||
- nodejs-test:
|
||||
name: test-v10-node11
|
||||
executor: v10-node11
|
||||
target: v10
|
||||
requires:
|
||||
- auto-build
|
||||
- build-v10-node11
|
||||
- nodejs-build:
|
||||
name: build-v10-node11-redis
|
||||
executor: v10-node11-redis
|
||||
target: v10
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
ignore:
|
||||
- imgbot
|
||||
- l10n_develop
|
||||
- patch/autogen/v10
|
||||
- patch/autogen/v11
|
||||
- nodejs-test:
|
||||
name: test-v10-node11-redis
|
||||
executor: v10-node11-redis
|
||||
target: v10
|
||||
requires:
|
||||
- build-v10-node11-redis
|
||||
- nodejs-build:
|
||||
name: build-v10-node10
|
||||
executor: v10-node10
|
||||
target: v10
|
||||
filters:
|
||||
branches:
|
||||
ignore:
|
||||
- imgbot
|
||||
- l10n_develop
|
||||
- patch/autogen/v10
|
||||
- patch/autogen/v11
|
||||
- nodejs-test:
|
||||
name: test-v10-node10
|
||||
executor: v10-node10
|
||||
target: v10
|
||||
requires:
|
||||
- build-v10-node10
|
||||
- nodejs-build:
|
||||
name: build-v10-node10-redis
|
||||
executor: v10-node10-redis
|
||||
target: v10
|
||||
filters:
|
||||
branches:
|
||||
ignore:
|
||||
- imgbot
|
||||
- l10n_develop
|
||||
- patch/autogen/v10
|
||||
- patch/autogen/v11
|
||||
- nodejs-test:
|
||||
name: test-v10-node10-redis
|
||||
executor: v10-node10-redis
|
||||
target: v10
|
||||
requires:
|
||||
- build-v10-node10-redis
|
||||
docker:
|
||||
jobs:
|
||||
- hold:
|
||||
name: manual-build-trigger
|
||||
type: approval
|
||||
- docker-ok:
|
||||
name: skip-docker
|
||||
filters:
|
||||
branches:
|
||||
ignore: master
|
||||
- docker:
|
||||
name: manual-build
|
||||
requires:
|
||||
- manual-build-trigger
|
||||
filters:
|
||||
branches:
|
||||
ignore: master
|
||||
- docker:
|
||||
name: auto-build
|
||||
with_deploy: true
|
||||
- docker-build:
|
||||
name: deploy-docker
|
||||
deploy: true
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
url: 'http://misskey.local'
|
||||
port: 80
|
||||
mongodb:
|
||||
host: localhost
|
||||
port: 27017
|
||||
db: misskey
|
||||
user: syuilo
|
||||
pass: ''
|
||||
drive:
|
||||
storage: 'db'
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
pass: ''
|
|
@ -0,0 +1,10 @@
|
|||
url: 'http://misskey.local'
|
||||
port: 80
|
||||
mongodb:
|
||||
host: localhost
|
||||
port: 27017
|
||||
db: misskey
|
||||
user: syuilo
|
||||
pass: ''
|
||||
drive:
|
||||
storage: 'db'
|
|
@ -0,0 +1,10 @@
|
|||
url: 'http://misskey.local'
|
||||
port: 80
|
||||
mongodb:
|
||||
host: localhost
|
||||
port: 27017
|
||||
db: misskey
|
||||
user: syuilo
|
||||
pass: ''
|
||||
drive:
|
||||
storage: 'db'
|
|
@ -0,0 +1,14 @@
|
|||
url: 'http://misskey.local'
|
||||
port: 80
|
||||
mongodb:
|
||||
host: localhost
|
||||
port: 27017
|
||||
db: misskey
|
||||
user: syuilo
|
||||
pass: ''
|
||||
drive:
|
||||
storage: 'db'
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
pass: ''
|
|
@ -3,8 +3,8 @@ port: 80
|
|||
mongodb:
|
||||
host: localhost
|
||||
port: 27017
|
||||
db: test-misskey
|
||||
user: admin
|
||||
db: misskey
|
||||
user: syuilo
|
||||
pass: ''
|
||||
# __REDIS__
|
||||
redis:
|
|
@ -0,0 +1,10 @@
|
|||
url: 'http://misskey.local'
|
||||
port: 80
|
||||
mongodb:
|
||||
host: localhost
|
||||
port: 27017
|
||||
db: misskey
|
||||
user: syuilo
|
||||
pass: ''
|
||||
drive:
|
||||
storage: 'db'
|
|
@ -0,0 +1,10 @@
|
|||
url: 'http://misskey.local'
|
||||
port: 80
|
||||
mongodb:
|
||||
host: localhost
|
||||
port: 27017
|
||||
db: misskey
|
||||
user: syuilo
|
||||
pass: ''
|
||||
drive:
|
||||
storage: 'db'
|
|
@ -0,0 +1,13 @@
|
|||
url: 'http://misskey.local'
|
||||
port: 80
|
||||
db:
|
||||
host: localhost
|
||||
port: 5432
|
||||
db: misskey
|
||||
user: syuilo
|
||||
pass: ''
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
pass: ''
|
||||
id: 'aid'
|
|
@ -0,0 +1,13 @@
|
|||
url: 'http://misskey.local'
|
||||
port: 80
|
||||
db:
|
||||
host: localhost
|
||||
port: 5432
|
||||
db: misskey
|
||||
user: syuilo
|
||||
pass: ''
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
pass: ''
|
||||
id: 'aid'
|
|
@ -0,0 +1,13 @@
|
|||
url: 'http://misskey.local'
|
||||
port: 80
|
||||
db:
|
||||
host: localhost
|
||||
port: 5432
|
||||
db: misskey
|
||||
user: syuilo
|
||||
pass: ''
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
pass: ''
|
||||
id: 'aid'
|
|
@ -0,0 +1,13 @@
|
|||
url: 'http://misskey.local'
|
||||
port: 80
|
||||
db:
|
||||
host: localhost
|
||||
port: 5432
|
||||
db: misskey
|
||||
user: syuilo
|
||||
pass: ''
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
pass: ''
|
||||
id: 'aid'
|
|
@ -5,12 +5,12 @@ import { genMeidg } from './id/meidg';
|
|||
import { genObjectId } from './id/object-id';
|
||||
import config from '../config';
|
||||
|
||||
const metohd = config.id.toLowerCase();
|
||||
const method = config.id.toLowerCase();
|
||||
|
||||
export function genId(date?: Date): string {
|
||||
if (!date || (date > new Date())) date = new Date();
|
||||
|
||||
switch (metohd) {
|
||||
switch (method) {
|
||||
case 'aid': return genAid(date);
|
||||
case 'meid': return genMeid(date);
|
||||
case 'meidg': return genMeidg(date);
|
||||
|
|
|
@ -217,7 +217,7 @@ export class Note {
|
|||
public renoteUserHost: string | null;
|
||||
//#endregion
|
||||
|
||||
constructor(data: Partial<Note>) {
|
||||
constructor(data?: Partial<Note> | null) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import { parse } from '../src/mfm/parse';
|
|||
describe('Extract mentions', () => {
|
||||
it('simple', () => {
|
||||
const ast = parse('@foo @bar @baz');
|
||||
const mentions = extractMentions(ast);
|
||||
const mentions = extractMentions(ast!);
|
||||
assert.deepStrictEqual(mentions, [{
|
||||
username: 'foo',
|
||||
acct: '@foo',
|
||||
|
@ -27,7 +27,7 @@ describe('Extract mentions', () => {
|
|||
|
||||
it('nested', () => {
|
||||
const ast = parse('@foo **@bar** @baz');
|
||||
const mentions = extractMentions(ast);
|
||||
const mentions = extractMentions(ast!);
|
||||
assert.deepStrictEqual(mentions, [{
|
||||
username: 'foo',
|
||||
acct: '@foo',
|
||||
|
|
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: Record<string, unknown>) => note.id === bobNote.id), true);
|
||||
assert.strictEqual(res.body.some((note: Record<string, unknown>) => 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: Record<string, unknown>) => note.id === aliceNote.id), true);
|
||||
assert.strictEqual(res.body.some((note: Record<string, unknown>) => note.id === bobNote.id), true);
|
||||
assert.strictEqual(res.body.some((note: Record<string, unknown>) => 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: Record<string, unknown>) => note.id === aliceNote.id), true);
|
||||
assert.strictEqual(res.body.some((note: Record<string, unknown>) => note.id === bobNote.id), false);
|
||||
assert.strictEqual(res.body.some((note: Record<string, unknown>) => 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: Record<string, unknown>) => notification.userId === bob.id), true);
|
||||
assert.strictEqual(res.body.some((notification: Record<string, unknown>) => notification.userId === carol.id), false);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
|
|
@ -16,9 +16,11 @@ process.env.NODE_ENV = 'test';
|
|||
|
||||
import * as assert from 'assert';
|
||||
import * as childProcess from 'child_process';
|
||||
import { Connection } from 'typeorm';
|
||||
import { async, signup, request, post, uploadFile } from './utils';
|
||||
import { Note } from '../built/models/entities/note';
|
||||
const initDb = require('../built/db/postgre.js').initDb;
|
||||
const { Note }: { Note: new () => unknown } = require('../built/models/entities/note');
|
||||
// tslint:disable-next-line: bool-param-default
|
||||
const { initDb }: { initDb(justBorrow?: boolean, sync?: boolean, log?: boolean): Promise<Connection> } = require('../built/db/postgre.js');
|
||||
|
||||
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: Record<string, unknown>) => note.id === jpgNote.id), true);
|
||||
assert.strictEqual(res.body.some((note: Record<string, unknown>) => 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: Record<string, unknown>) => note.id === jpgNote.id), true);
|
||||
assert.strictEqual(res.body.some((note: Record<string, unknown>) => note.id === pngNote.id), true);
|
||||
assert.strictEqual(res.body.some((note: Record<string, unknown>) => note.id === jpgPngNote.id), true);
|
||||
}));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue