mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-13 08:06:24 +08:00
fix(server): relax the rate limits (#4092)
This commit is contained in:
@@ -15,7 +15,7 @@ import { AppModule } from '../app';
|
||||
|
||||
const gql = '/graphql';
|
||||
|
||||
describe('AppModule', () => {
|
||||
describe('AppModule', async () => {
|
||||
let app: INestApplication;
|
||||
|
||||
// cleanup database before each test
|
||||
@@ -54,7 +54,7 @@ describe('AppModule', () => {
|
||||
await app.close();
|
||||
});
|
||||
|
||||
test('should init app', async () => {
|
||||
await test('should init app', async () => {
|
||||
ok(typeof app === 'object');
|
||||
await request(app.getHttpServer())
|
||||
.post(gql)
|
||||
@@ -85,7 +85,7 @@ describe('AppModule', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('should find default user', async () => {
|
||||
await test('should find default user', async () => {
|
||||
const { token } = await createToken(app);
|
||||
await request(app.getHttpServer())
|
||||
.post(gql)
|
||||
@@ -106,7 +106,7 @@ describe('AppModule', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('should be able to upload avatar', async () => {
|
||||
await test('should be able to upload avatar', async () => {
|
||||
const { token, id } = await createToken(app);
|
||||
const png = await Transformer.fromRgbaPixels(
|
||||
Buffer.alloc(400 * 400 * 4).fill(255),
|
||||
|
||||
@@ -62,7 +62,7 @@ describe('Workspace Module', () => {
|
||||
ok(user.email === 'u1@affine.pro', 'user.email is not valid');
|
||||
});
|
||||
|
||||
it('should be throttled at call signUp', async () => {
|
||||
it.skip('should be throttled at call signUp', async () => {
|
||||
let token = '';
|
||||
for (let i = 0; i < 10; i++) {
|
||||
token = (await signUp(app, `u${i}`, `u${i}@affine.pro`, `${i}`)).token
|
||||
|
||||
Reference in New Issue
Block a user