mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-27 00:13:03 +00:00
35ec41fc1e
* enhance(backend): テストの高速化 * add ls * 自動的にマージされるようなので不要 * 起動方法を揃える * fix test
29 lines
841 B
TypeScript
29 lines
841 B
TypeScript
/*
|
|
* 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 { relativeFetch } from '../utils.js';
|
|
|
|
describe('nodeinfo', () => {
|
|
test('nodeinfo 2.1', async () => {
|
|
const res = await relativeFetch('nodeinfo/2.1');
|
|
assert.ok(res.ok);
|
|
assert.strictEqual(res.headers.get('Access-Control-Allow-Origin'), '*');
|
|
|
|
const nodeInfo = await res.json() as any;
|
|
assert.strictEqual(nodeInfo.software.name, 'misskey');
|
|
});
|
|
|
|
test('nodeinfo 2.0', async () => {
|
|
const res = await relativeFetch('nodeinfo/2.0');
|
|
assert.ok(res.ok);
|
|
assert.strictEqual(res.headers.get('Access-Control-Allow-Origin'), '*');
|
|
|
|
const nodeInfo = await res.json() as any;
|
|
assert.strictEqual(nodeInfo.software.name, 'misskey');
|
|
});
|
|
});
|