Skip to content

Commit

Permalink
prettier formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Aug 19, 2019
1 parent f80d459 commit c5d69ac
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/path.level.parameters.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ describe(packageJson.name, () => {
// Define new coercion routes
app.use(
`${basePath}`,
express
.Router()
.get(`/path_level_parameters`, (_req, res) => res.send())
express.Router().get(`/path_level_parameters`, (_req, res) => res.send()),
);
});

Expand All @@ -39,10 +37,10 @@ describe(packageJson.name, () => {
.send()
.expect(400)
.then(r => {
expect(r.body.errors).to.be.an('array')
expect(r.body.errors).to.be.an('array');
expect(r.body.errors).to.have.length(1);
const message = r.body.errors[0].message;
expect(message).to.equal('should have required property \'pathLevel\'');
expect(message).to.equal("should have required property 'pathLevel'");
}));

it('should return 400 if operationLevel query parameter is not provided', async () =>
Expand All @@ -51,10 +49,12 @@ describe(packageJson.name, () => {
.send()
.expect(400)
.then(r => {
expect(r.body.errors).to.be.an('array')
expect(r.body.errors).to.be.an('array');
expect(r.body.errors).to.have.length(1);
const message = r.body.errors[0].message;
expect(message).to.equal('should have required property \'operationLevel\'');
expect(message).to.equal(
"should have required property 'operationLevel'",
);
}));

it('should return 400 if neither operationLevel, nor pathLevel query parameters are provided', async () =>
Expand All @@ -63,12 +63,12 @@ describe(packageJson.name, () => {
.send()
.expect(400)
.then(r => {
expect(r.body.errors).to.be.an('array')
expect(r.body.errors).to.be.an('array');
expect(r.body.errors).to.have.length(2);
const messages = r.body.errors.map(err => err.message);
expect(messages).to.have.members([
'should have required property \'pathLevel\'',
'should have required property \'operationLevel\''
"should have required property 'pathLevel'",
"should have required property 'operationLevel'",
]);
}));

Expand Down

0 comments on commit c5d69ac

Please sign in to comment.