Skip to content

Commit

Permalink
remove unnecessary test about ignoreExamples and seed
Browse files Browse the repository at this point in the history
  • Loading branch information
ilanashapiro committed Aug 22, 2024
1 parent b65b244 commit 7e49ee1
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions packages/http-server/src/__tests__/server.oas.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ describe('Ignore examples', () => {

beforeAll(async () => {
server = await instantiatePrism(resolve(__dirname, 'fixtures', 'ignore-examples.oas3.yaml'), {
mock: { dynamic: false, ignoreExamples: true, seed: "test_seed"},
mock: { dynamic: false, ignoreExamples: true },
});
});

Expand Down Expand Up @@ -242,24 +242,6 @@ describe('Ignore examples', () => {
expect(hasPropertiesOfType(payload, schema)).toBe(true);
expect(payload.name).not.toBe('doggie');
});

describe('and since a seed was set', () => {
describe('if I hit the same endpoint twice', () => {
let payload: unknown;
let secondPayload: unknown;

beforeAll(async () => {
payload = await fetch(new URL('/no_auth/pets?name=joe', server.address), { method: 'GET' }).then(r =>
r.json()
);
secondPayload = await fetch(new URL('/no_auth/pets?name=joe', server.address), { method: 'GET' }).then(r =>
r.json()
);
});

it('should return the same object', () => expect(payload).toStrictEqual(secondPayload));
});
});
});
});
});
Expand Down

0 comments on commit 7e49ee1

Please sign in to comment.