Skip to content

Commit 89099af

Browse files
chore: update mock server docs
1 parent c06dabf commit 89099af

13 files changed

Lines changed: 27 additions & 33 deletions

CONTRIBUTING.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ $ pnpm link -—global cas-parser-node
6565

6666
## Running tests
6767

68-
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
69-
70-
```sh
71-
$ npx prism mock path/to/your/openapi.yml
72-
```
73-
7468
```sh
7569
$ pnpm run test
7670
```

tests/api-resources/access-token.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const client = new CasParser({
88
});
99

1010
describe('resource accessToken', () => {
11-
// Prism tests are disabled
11+
// Mock server tests are disabled
1212
test.skip('create', async () => {
1313
const responsePromise = client.accessToken.create();
1414
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource accessToken', () => {
2020
expect(dataAndResponse.response).toBe(rawResponse);
2121
});
2222

23-
// Prism tests are disabled
23+
// Mock server tests are disabled
2424
test.skip('create: request options and params are passed correctly', async () => {
2525
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
2626
await expect(

tests/api-resources/cams-kfintech.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const client = new CasParser({
88
});
99

1010
describe('resource camsKfintech', () => {
11-
// Prism tests are disabled
11+
// Mock server tests are disabled
1212
test.skip('parse', async () => {
1313
const responsePromise = client.camsKfintech.parse({});
1414
const rawResponse = await responsePromise.asResponse();

tests/api-resources/cdsl/cdsl.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const client = new CasParser({
88
});
99

1010
describe('resource cdsl', () => {
11-
// Prism tests are disabled
11+
// Mock server tests are disabled
1212
test.skip('parsePdf', async () => {
1313
const responsePromise = client.cdsl.parsePdf({});
1414
const rawResponse = await responsePromise.asResponse();

tests/api-resources/cdsl/fetch.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const client = new CasParser({
88
});
99

1010
describe('resource fetch', () => {
11-
// Prism tests are disabled
11+
// Mock server tests are disabled
1212
test.skip('requestOtp: only required params', async () => {
1313
const responsePromise = client.cdsl.fetch.requestOtp({
1414
bo_id: '1234567890123456',
@@ -24,7 +24,7 @@ describe('resource fetch', () => {
2424
expect(dataAndResponse.response).toBe(rawResponse);
2525
});
2626

27-
// Prism tests are disabled
27+
// Mock server tests are disabled
2828
test.skip('requestOtp: required and optional params', async () => {
2929
const response = await client.cdsl.fetch.requestOtp({
3030
bo_id: '1234567890123456',
@@ -33,7 +33,7 @@ describe('resource fetch', () => {
3333
});
3434
});
3535

36-
// Prism tests are disabled
36+
// Mock server tests are disabled
3737
test.skip('verifyOtp: only required params', async () => {
3838
const responsePromise = client.cdsl.fetch.verifyOtp('session_id', { otp: '123456' });
3939
const rawResponse = await responsePromise.asResponse();
@@ -45,7 +45,7 @@ describe('resource fetch', () => {
4545
expect(dataAndResponse.response).toBe(rawResponse);
4646
});
4747

48-
// Prism tests are disabled
48+
// Mock server tests are disabled
4949
test.skip('verifyOtp: required and optional params', async () => {
5050
const response = await client.cdsl.fetch.verifyOtp('session_id', { otp: '123456', num_periods: 6 });
5151
});

tests/api-resources/contract-note.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const client = new CasParser({
88
});
99

1010
describe('resource contractNote', () => {
11-
// Prism tests are disabled
11+
// Mock server tests are disabled
1212
test.skip('parse', async () => {
1313
const responsePromise = client.contractNote.parse({});
1414
const rawResponse = await responsePromise.asResponse();

tests/api-resources/credits.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const client = new CasParser({
88
});
99

1010
describe('resource credits', () => {
11-
// Prism tests are disabled
11+
// Mock server tests are disabled
1212
test.skip('check', async () => {
1313
const responsePromise = client.credits.check();
1414
const rawResponse = await responsePromise.asResponse();

tests/api-resources/inbox.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const client = new CasParser({
88
});
99

1010
describe('resource inbox', () => {
11-
// Prism tests are disabled
11+
// Mock server tests are disabled
1212
test.skip('checkConnectionStatus: only required params', async () => {
1313
const responsePromise = client.inbox.checkConnectionStatus({ 'x-inbox-token': 'x-inbox-token' });
1414
const rawResponse = await responsePromise.asResponse();
@@ -20,12 +20,12 @@ describe('resource inbox', () => {
2020
expect(dataAndResponse.response).toBe(rawResponse);
2121
});
2222

23-
// Prism tests are disabled
23+
// Mock server tests are disabled
2424
test.skip('checkConnectionStatus: required and optional params', async () => {
2525
const response = await client.inbox.checkConnectionStatus({ 'x-inbox-token': 'x-inbox-token' });
2626
});
2727

28-
// Prism tests are disabled
28+
// Mock server tests are disabled
2929
test.skip('connectEmail: only required params', async () => {
3030
const responsePromise = client.inbox.connectEmail({ redirect_uri: 'https://yourapp.com/oauth-callback' });
3131
const rawResponse = await responsePromise.asResponse();
@@ -37,15 +37,15 @@ describe('resource inbox', () => {
3737
expect(dataAndResponse.response).toBe(rawResponse);
3838
});
3939

40-
// Prism tests are disabled
40+
// Mock server tests are disabled
4141
test.skip('connectEmail: required and optional params', async () => {
4242
const response = await client.inbox.connectEmail({
4343
redirect_uri: 'https://yourapp.com/oauth-callback',
4444
state: 'abc123',
4545
});
4646
});
4747

48-
// Prism tests are disabled
48+
// Mock server tests are disabled
4949
test.skip('disconnectEmail: only required params', async () => {
5050
const responsePromise = client.inbox.disconnectEmail({ 'x-inbox-token': 'x-inbox-token' });
5151
const rawResponse = await responsePromise.asResponse();
@@ -57,12 +57,12 @@ describe('resource inbox', () => {
5757
expect(dataAndResponse.response).toBe(rawResponse);
5858
});
5959

60-
// Prism tests are disabled
60+
// Mock server tests are disabled
6161
test.skip('disconnectEmail: required and optional params', async () => {
6262
const response = await client.inbox.disconnectEmail({ 'x-inbox-token': 'x-inbox-token' });
6363
});
6464

65-
// Prism tests are disabled
65+
// Mock server tests are disabled
6666
test.skip('listCasFiles: only required params', async () => {
6767
const responsePromise = client.inbox.listCasFiles({ 'x-inbox-token': 'x-inbox-token' });
6868
const rawResponse = await responsePromise.asResponse();
@@ -74,7 +74,7 @@ describe('resource inbox', () => {
7474
expect(dataAndResponse.response).toBe(rawResponse);
7575
});
7676

77-
// Prism tests are disabled
77+
// Mock server tests are disabled
7878
test.skip('listCasFiles: required and optional params', async () => {
7979
const response = await client.inbox.listCasFiles({
8080
'x-inbox-token': 'x-inbox-token',

tests/api-resources/kfintech.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const client = new CasParser({
88
});
99

1010
describe('resource kfintech', () => {
11-
// Prism tests are disabled
11+
// Mock server tests are disabled
1212
test.skip('generateCas: only required params', async () => {
1313
const responsePromise = client.kfintech.generateCas({
1414
email: 'user@example.com',
@@ -25,7 +25,7 @@ describe('resource kfintech', () => {
2525
expect(dataAndResponse.response).toBe(rawResponse);
2626
});
2727

28-
// Prism tests are disabled
28+
// Mock server tests are disabled
2929
test.skip('generateCas: required and optional params', async () => {
3030
const response = await client.kfintech.generateCas({
3131
email: 'user@example.com',

tests/api-resources/logs.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const client = new CasParser({
88
});
99

1010
describe('resource logs', () => {
11-
// Prism tests are disabled
11+
// Mock server tests are disabled
1212
test.skip('create', async () => {
1313
const responsePromise = client.logs.create();
1414
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource logs', () => {
2020
expect(dataAndResponse.response).toBe(rawResponse);
2121
});
2222

23-
// Prism tests are disabled
23+
// Mock server tests are disabled
2424
test.skip('create: request options and params are passed correctly', async () => {
2525
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
2626
await expect(
@@ -35,7 +35,7 @@ describe('resource logs', () => {
3535
).rejects.toThrow(CasParser.NotFoundError);
3636
});
3737

38-
// Prism tests are disabled
38+
// Mock server tests are disabled
3939
test.skip('getSummary', async () => {
4040
const responsePromise = client.logs.getSummary();
4141
const rawResponse = await responsePromise.asResponse();
@@ -47,7 +47,7 @@ describe('resource logs', () => {
4747
expect(dataAndResponse.response).toBe(rawResponse);
4848
});
4949

50-
// Prism tests are disabled
50+
// Mock server tests are disabled
5151
test.skip('getSummary: request options and params are passed correctly', async () => {
5252
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
5353
await expect(

0 commit comments

Comments
 (0)