Skip to content

Commit

Permalink
chore: remove openapi matching
Browse files Browse the repository at this point in the history
  • Loading branch information
slowbackspace committed Mar 15, 2023
1 parent a483054 commit 6d79c00
Show file tree
Hide file tree
Showing 47 changed files with 168 additions and 497 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-unicorn": "^46.0.0",
"express": "^4.18.2",
"jest-openapi": "^0.14.2",
"make-coverage-badge": "^1.2.0",
"nodemon": "^2.0.21",
"prettier": "2.8.4",
Expand Down
37 changes: 0 additions & 37 deletions test/unit/setup.ts

This file was deleted.

2 changes: 1 addition & 1 deletion test/unit/tests/routes/accounts.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('accounts service', () => {
.set('unpaged', 'arbitraryStringValue')
: await supertest(fastify.server).get(fixture.endpoint);

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toEqual(fixture.response);

fastify.close();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tests/routes/addresses.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('address service', () => {
.set('unpaged', 'arbitraryStringValue')
: await supertest(fastify.server).get(fixture.endpoint);

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toEqual(fixture.response);

fastify.close();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tests/routes/assets.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('assets service', () => {
.set('unpaged', 'arbitraryStringValue')
: await supertest(fastify.server).get(fixture.endpoint);

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toStrictEqual(fixture.response);

fastify.close();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tests/routes/blocks.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('blocks service', () => {
.set('unpaged', 'arbitraryStringValue')
: await supertest(fastify.server).get(fixture.endpoint);

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toEqual(fixture.response);

fastify.close();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tests/routes/epochs.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('epochs service', () => {
.set('unpaged', 'arbitraryStringValue')
: await supertest(fastify.server).get(fixture.endpoint);

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toEqual(fixture.response);

fastify.close();
Expand Down
4 changes: 2 additions & 2 deletions test/unit/tests/routes/health.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('health endpoints tests', () => {
const response = await supertest(fastify.server).get('/health');

expect(response.body).toEqual({ is_healthy: true });
expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();

fastify.close();
});
Expand All @@ -32,7 +32,7 @@ describe('health endpoints tests', () => {
const response = await supertest(fastify.server).get('/health/clock');

expect(response.body).toEqual({ server_time: clock.now });
expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();

fastify.close();
clock.restore();
Expand Down
4 changes: 2 additions & 2 deletions test/unit/tests/routes/ledger.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('ledger service', () => {
await fastify.ready();
const response = await supertest(fastify.server).get('/genesis');

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toEqual({
active_slots_coefficient: 0.05,
update_quorum: 5,
Expand All @@ -42,7 +42,7 @@ describe('ledger service', () => {
await fastify.ready();
const response = await supertest(fastify.server).get('/genesis');

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toEqual({
active_slots_coefficient: 0.05,
update_quorum: 5,
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tests/routes/metadata.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('metadata service', () => {
.set('unpaged', 'arbitraryStringValue')
: await supertest(fastify.server).get(fixture.endpoint);

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toEqual(fixture.response);
fastify.close();
});
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tests/routes/network.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('network service', () => {

const response = await supertest(fastify.server).get(fixture.endpoint);

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toEqual(fixture.response);

fastify.close();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tests/routes/nutlink.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('nutlink service', () => {
.set('unpaged', 'arbitraryStringValue')
: await supertest(fastify.server).get(fixture.endpoint);

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toEqual(fixture.response);

fastify.close();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tests/routes/pools.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('pools service', () => {
await fastify.ready();
const response = await supertest(fastify.server).get('/pools');

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toEqual({
error: 'Internal Server Error',
message: 'An unexpected response was received from the backend.',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tests/routes/root.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('GET /example/endpoint', () => {
const response = await supertest(fastify.server).get('/');

expect(response.body).toEqual({ url: 'https://blockfrost.io/', version: expect.any(String) });
expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();

fastify.close();
});
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tests/routes/scripts.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('scripts service', () => {
.set('unpaged', 'arbitraryStringValue')
: await supertest(fastify.server).get(fixture.endpoint);

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toEqual(fixture.response);

fastify.close();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tests/routes/txs.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('txs service', () => {

const response = await supertest(fastify.server).get(fixture.endpoint);

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toEqual(fixture.response);

fastify.close();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tests/routes/utils.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('utils', () => {

const response = await supertest(fastify.server).get(fixture.endpoint);

expect(response).toSatisfyApiSpec();
// expect(response).toMatchSnapshot();
expect(response.body).toEqual(fixture.response);
});
});
Expand Down
1 change: 0 additions & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export default defineConfig({
testTimeout: 20_000,
root: '.',
mockReset: true,
setupFiles: ['test/unit/setup.ts'],
include: [...defaultInclude, 'test/unit/tests/**/*.ts'],
},
});

0 comments on commit 6d79c00

Please sign in to comment.