Skip to content

Commit 90e8c2d

Browse files
chore: update mock server docs
1 parent 8dd5a3d commit 90e8c2d

3 files changed

Lines changed: 14 additions & 20 deletions

File tree

CONTRIBUTING.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ $ pnpm link -—global @grid-is/api
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
$ yarn run test
7670
```

tests/api-resources/beta.test.ts

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

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

23-
// Prism tests are disabled
23+
// Mock server tests are disabled
2424
test.skip('getWorkbookParameters', async () => {
2525
const responsePromise = client.beta.getWorkbookParameters('id');
2626
const rawResponse = await responsePromise.asResponse();
@@ -32,7 +32,7 @@ describe('resource beta', () => {
3232
expect(dataAndResponse.response).toBe(rawResponse);
3333
});
3434

35-
// Prism tests are disabled
35+
// Mock server tests are disabled
3636
test.skip('searchLabels: only required params', async () => {
3737
const responsePromise = client.beta.searchLabels({ query: 'profit' });
3838
const rawResponse = await responsePromise.asResponse();
@@ -44,7 +44,7 @@ describe('resource beta', () => {
4444
expect(dataAndResponse.response).toBe(rawResponse);
4545
});
4646

47-
// Prism tests are disabled
47+
// Mock server tests are disabled
4848
test.skip('searchLabels: required and optional params', async () => {
4949
const response = await client.beta.searchLabels({
5050
query: 'profit',

tests/api-resources/workbooks.test.ts

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

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

23-
// Prism tests are disabled
23+
// Mock server tests are disabled
2424
test.skip('list: 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(
2727
client.workbooks.list({ cursor: 'cursor', limit: 0 }, { path: '/_stainless_unknown_path' }),
2828
).rejects.toThrow(Grid.NotFoundError);
2929
});
3030

31-
// Prism tests are disabled
31+
// Mock server tests are disabled
3232
test.skip('calc: only required params', async () => {
3333
const responsePromise = client.workbooks.calc('id', { read: ['A1'] });
3434
const rawResponse = await responsePromise.asResponse();
@@ -40,7 +40,7 @@ describe('resource workbooks', () => {
4040
expect(dataAndResponse.response).toBe(rawResponse);
4141
});
4242

43-
// Prism tests are disabled
43+
// Mock server tests are disabled
4444
test.skip('calc: required and optional params', async () => {
4545
const response = await client.workbooks.calc('id', {
4646
read: ['A1'],
@@ -53,7 +53,7 @@ describe('resource workbooks', () => {
5353
});
5454
});
5555

56-
// Prism tests are disabled
56+
// Mock server tests are disabled
5757
test.skip('query: only required params', async () => {
5858
const responsePromise = client.workbooks.query('id', { read: ['A1', 'Sheet2!B3', '=SUM(A1:A4)'] });
5959
const rawResponse = await responsePromise.asResponse();
@@ -65,7 +65,7 @@ describe('resource workbooks', () => {
6565
expect(dataAndResponse.response).toBe(rawResponse);
6666
});
6767

68-
// Prism tests are disabled
68+
// Mock server tests are disabled
6969
test.skip('query: required and optional params', async () => {
7070
const response = await client.workbooks.query('id', {
7171
read: ['A1', 'Sheet2!B3', '=SUM(A1:A4)'],
@@ -124,7 +124,7 @@ describe('resource workbooks', () => {
124124
});
125125
});
126126

127-
// Prism tests are disabled
127+
// Mock server tests are disabled
128128
test.skip('upload: only required params', async () => {
129129
const responsePromise = client.workbooks.upload({
130130
file: await toFile(Buffer.from('# my file contents'), 'README.md'),
@@ -138,14 +138,14 @@ describe('resource workbooks', () => {
138138
expect(dataAndResponse.response).toBe(rawResponse);
139139
});
140140

141-
// Prism tests are disabled
141+
// Mock server tests are disabled
142142
test.skip('upload: required and optional params', async () => {
143143
const response = await client.workbooks.upload({
144144
file: await toFile(Buffer.from('# my file contents'), 'README.md'),
145145
});
146146
});
147147

148-
// Prism tests are disabled
148+
// Mock server tests are disabled
149149
test.skip('values: only required params', async () => {
150150
const responsePromise = client.workbooks.values('id', { read: ['A1'] });
151151
const rawResponse = await responsePromise.asResponse();
@@ -157,7 +157,7 @@ describe('resource workbooks', () => {
157157
expect(dataAndResponse.response).toBe(rawResponse);
158158
});
159159

160-
// Prism tests are disabled
160+
// Mock server tests are disabled
161161
test.skip('values: required and optional params', async () => {
162162
const response = await client.workbooks.values('id', {
163163
read: ['A1'],

0 commit comments

Comments
 (0)