Skip to content

Commit b0261b8

Browse files
committed
Remove outdated tests
1 parent 2b930d0 commit b0261b8

File tree

1 file changed

+1
-89
lines changed

1 file changed

+1
-89
lines changed

tests/gitbook.test.ts

+1-89
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,6 @@
11
import { expect, test } from 'bun:test';
22
import { validateRequest, ValidationError } from './gitbook.validate';
33

4-
test('POST /spaces/1234/hive/token', () => {
5-
const result = validateRequest({
6-
path: '/spaces/1234/hive/token',
7-
method: 'post',
8-
headers: {
9-
'content-type': 'application/json',
10-
},
11-
query: {},
12-
});
13-
expect(result).toMatchObject({
14-
headers: {
15-
'content-type': 'application/json',
16-
},
17-
method: 'post',
18-
operationId: 'generateSpaceHiveReadAccessToken',
19-
params: {
20-
spaceId: '1234',
21-
},
22-
path: '/spaces/1234/hive/token',
23-
query: {},
24-
});
25-
});
26-
274
test('POST orgs/appleId/custom-fields', () => {
285
const result = validateRequest({
296
path: '/orgs/appleId/custom-fields',
@@ -114,70 +91,6 @@ test('POST orgs/appleId/custom-fields', () => {
11491
});
11592
});
11693

117-
test('PUT orgs/apple/schemas/newType', () => {
118-
const result = validateRequest({
119-
path: '/orgs/apple/schemas/newType',
120-
method: 'put',
121-
headers: {
122-
'content-type': 'application/json',
123-
},
124-
query: {},
125-
body: {
126-
type: 'newType',
127-
title: {
128-
singular: 'New type',
129-
plural: 'New types',
130-
},
131-
properties: [
132-
{
133-
name: 'title',
134-
type: 'text',
135-
title: 'Title',
136-
},
137-
],
138-
},
139-
});
140-
expect(result).toMatchObject({
141-
operationId: 'setEntitySchema',
142-
params: {
143-
organizationId: 'apple',
144-
entityType: 'newType',
145-
},
146-
});
147-
});
148-
149-
test('PUT orgs/apple/schemas/newType/entities', () => {
150-
const result = validateRequest({
151-
path: '/orgs/apple/schemas/newType/entities',
152-
method: 'put',
153-
headers: {
154-
'content-type': 'application/json',
155-
},
156-
query: {},
157-
body: {
158-
entities: [
159-
{
160-
entityId: 'something',
161-
properties: {
162-
title: 'Updated lambda',
163-
description: 'the description',
164-
url: 'https://example.com',
165-
public_traffic: false,
166-
created_on: '2020-01-01T00:00:00.000Z',
167-
},
168-
},
169-
],
170-
},
171-
});
172-
expect(result).toMatchObject({
173-
operationId: 'upsertSchemaEntities',
174-
params: {
175-
organizationId: 'apple',
176-
entityType: 'newType',
177-
},
178-
});
179-
});
180-
18194
test('POST orgs/apple/members/jony (invalid)', () => {
18295
const result = validateRequest({
18396
path: '/orgs/apple/members/jony',
@@ -327,7 +240,7 @@ test('GET spaces/space_iphone-doc/revisions/somerevision/files?limit=1000 (inval
327240
'content-type': 'application/json',
328241
},
329242
query: {
330-
limit: '1000',
243+
limit: '10000',
331244
},
332245
});
333246
expect(result instanceof ValidationError ? result.path : null).toEqual(['query', 'limit']);
@@ -358,6 +271,5 @@ test('GET orgs/xxx/synced-blocks?ids=foo parsed as array', () => {
358271
ids: 'foo',
359272
},
360273
});
361-
console.log(result);
362274
expect(result.query).toEqual({ ids: ['foo'] });
363275
});

0 commit comments

Comments
 (0)