enhance(backend): テストの高速化 (#12939)
* enhance(backend): テストの高速化 * add ls * 自動的にマージされるようなので不要 * 起動方法を揃える * fix test
This commit is contained in:
parent
618e2ba1d2
commit
35ec41fc1e
45 changed files with 563 additions and 283 deletions
|
@ -10,7 +10,7 @@ import * as crypto from 'node:crypto';
|
|||
import cbor from 'cbor';
|
||||
import * as OTPAuth from 'otpauth';
|
||||
import { loadConfig } from '@/config.js';
|
||||
import { api, signup, startServer } from '../utils.js';
|
||||
import { api, signup } from '../utils.js';
|
||||
import type {
|
||||
AuthenticationResponseJSON,
|
||||
AuthenticatorAssertionResponseJSON,
|
||||
|
@ -19,11 +19,9 @@ import type {
|
|||
PublicKeyCredentialRequestOptionsJSON,
|
||||
RegistrationResponseJSON,
|
||||
} from '@simplewebauthn/typescript-types';
|
||||
import type { INestApplicationContext } from '@nestjs/common';
|
||||
import type * as misskey from 'misskey-js';
|
||||
|
||||
describe('2要素認証', () => {
|
||||
let app: INestApplicationContext;
|
||||
let alice: misskey.entities.SignupResponse;
|
||||
|
||||
const config = loadConfig();
|
||||
|
@ -185,14 +183,9 @@ describe('2要素認証', () => {
|
|||
};
|
||||
|
||||
beforeAll(async () => {
|
||||
app = await startServer();
|
||||
alice = await signup({ username, password });
|
||||
}, 1000 * 60 * 2);
|
||||
|
||||
afterAll(async () => {
|
||||
await app.close();
|
||||
});
|
||||
|
||||
test('が設定でき、OTPでログインできる。', async () => {
|
||||
const registerResponse = await api('/i/2fa/register', {
|
||||
password,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue