Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
wheresrhys committed Apr 8, 2021
1 parent fba85f6 commit 9c7d0b0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ const schemaFixture = {
};

describe('test schema properties', () => {

// Note that this behaviour is the opposite as tc-schema-publisher
// This is because, consider teh test environment:
// 1. tc-schema-publisher explicitly publishes including test properties
Expand All @@ -104,7 +103,6 @@ describe('test schema properties', () => {
it('includes test properties by default', async () => {
const schema = new SDK({
schemaData: { schema: schemaFixture },
includeTestDefinitions: true,
});
await schema.ready();
expect(schema.getTypes().length).toEqual(2);
Expand All @@ -129,7 +127,10 @@ describe('test schema properties', () => {
});

it('excludes test properties on demand', async () => {
const schema = new SDK({ schemaData: { schema: schemaFixture } });
const schema = new SDK({
schemaData: { schema: schemaFixture },
includeTestDefinitions: false,
});
await schema.ready();
expect(schema.getTypes().length).toEqual(1);
expect(schema.getTypes()[0].name).toEqual('TypeA');
Expand Down

0 comments on commit 9c7d0b0

Please sign in to comment.