Skip to content

Commit

Permalink
Fixed code style
Browse files Browse the repository at this point in the history
  • Loading branch information
luisfpg committed Jan 5, 2021
1 parent 49fa23d commit 162792d
Showing 1 changed file with 47 additions and 45 deletions.
92 changes: 47 additions & 45 deletions test/parameter.spec.ts
Original file line number Diff line number Diff line change
@@ -1,71 +1,74 @@
import { Parameter } from '../lib/parameter';

const parameterNotExploded = new Parameter({
explode: false,
name: 'par1',
in: 'query',
description: 'Description of par1',
const parameterNotExploded = new Parameter(
{
explode: false,
name: 'par1',
in: 'query',
description: 'Description of par1',
style: 'form',
schema: {
type: 'array',
items: {
type: 'string'
schema: {
type: 'array',
items: {
type: 'string'
}
}
},
{
}
},
{
input: 'fake.json'
},
},
{
openapi: '',
openapi: '',
info: {
title: 'fake open api',
version: '3.0.0'
},
paths: []
});

const parameterExploded = new Parameter({
const parameterExploded = new Parameter(
{
explode: true,
name: 'par1',
in: 'query',
description: 'Description of par1',
name: 'par1',
in: 'query',
description: 'Description of par1',
style: 'form',
schema: {
type: 'array',
items: {
type: 'string'
schema: {
type: 'array',
items: {
type: 'string'
}
}
},
{
}
},
{
input: 'fake.json'
},
},
{
openapi: '',
openapi: '',
info: {
title: 'fake open api',
version: '3.0.0'
},
paths: []
});

const parameter = new Parameter({
name: 'par1',
in: 'query',
description: 'Description of par1',
schema: {
type: 'array',
items: {
type: 'string'
const parameter = new Parameter(
{
name: 'par1',
in: 'query',
description: 'Description of par1',
schema: {
type: 'array',
items: {
type: 'string'
}
}
},
{
}
},
{
input: 'fake.json'
},
},
{
openapi: '',
openapi: '',
info: {
title: 'fake open api',
version: '3.0.0'
Expand All @@ -75,9 +78,8 @@ const parameterExploded = new Parameter({

describe('Parameters constructor', () => {
it('paramter options should be serialized', () => {
expect(parameterNotExploded.parameterOptions).toBe("{\"style\":\"form\",\"explode\":false}");
expect(parameterExploded.parameterOptions).toBe("{\"style\":\"form\",\"explode\":true}");
expect(parameter.parameterOptions).toBe("{}");

expect(parameterNotExploded.parameterOptions).toBe('{"style":"form","explode":false}');
expect(parameterExploded.parameterOptions).toBe('{"style":"form","explode":true}');
expect(parameter.parameterOptions).toBe('{}');
});
});
});

0 comments on commit 162792d

Please sign in to comment.