Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
test: adds proper variables declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-zakharchenko committed May 2, 2019
1 parent e97dfd6 commit de6cfd9
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions test/unit/validate-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const fixtures = require('../fixtures');

describe('Gavel proxies to functions with callbacks', () => {
// Examples from README.md
baseHttpMessage = {
const baseHttpMessage = {
statusCode: '200',
headers: {
'content-type': 'application/json',
Expand All @@ -17,9 +17,9 @@ describe('Gavel proxies to functions with callbacks', () => {
body: '{\n "origin": "94.113.241.2"\n}'
};

cloneHttpMessage = clone(baseHttpMessage, false);
const cloneHttpMessage = clone(baseHttpMessage, false);

differentHttpMessage = {
const differentHttpMessage = {
statusCode: '404',
headers: {
'content-type': 'application/vnd.gavel.vX+json', // different from baseHttpMessage
Expand All @@ -31,7 +31,7 @@ describe('Gavel proxies to functions with callbacks', () => {
body: '{"r2":"d2"}'
};

similarHttpMessage = {
const similarHttpMessage = {
statusCode: '200',
headers: {
'CONTENT-TYPE': 'application/json',
Expand All @@ -47,8 +47,8 @@ describe('Gavel proxies to functions with callbacks', () => {
describe('when I provide data from README (good objects)', () => {
['response', 'request'].forEach((variant) => {
describe('for two cloned #{variant}s', () => {
results = null;
error = null;
let results = null;
let error = null;

before((done) => {
isValidatable(
Expand All @@ -70,8 +70,8 @@ describe('Gavel proxies to functions with callbacks', () => {
});

describe('for similar #{variant}s', () => {
results = null;
error = null;
let results = null;
let error = null;

before((done) => {
isValidatable(
Expand All @@ -93,8 +93,8 @@ describe('Gavel proxies to functions with callbacks', () => {
});

describe('for different #{variant}s', () => {
results = null;
error = null;
let results = null;
let error = null;

before((done) => {
isValidatable(
Expand Down Expand Up @@ -122,8 +122,8 @@ describe('Gavel proxies to functions with callbacks', () => {
describe('when I provide data', () => {
['response', 'request'].forEach((variant) => {
describe('for two cloned #{variant}s', () => {
results = null;
error = null;
let results = null;
let error = null;

before((done) => {
isValid(
Expand All @@ -145,8 +145,8 @@ describe('Gavel proxies to functions with callbacks', () => {
});

describe('for similar #{variant}s', () => {
results = null;
error = null;
let results = null;
let error = null;

before((done) => {
isValid(
Expand All @@ -168,8 +168,8 @@ describe('Gavel proxies to functions with callbacks', () => {
});

describe('for different #{variant}s', () => {
results = null;
error = null;
let results = null;
let error = null;

before((done) => {
isValid(
Expand Down Expand Up @@ -197,8 +197,8 @@ describe('Gavel proxies to functions with callbacks', () => {
describe('when I provide data', () => {
['response', 'request'].forEach((variant) => {
describe('for two cloned #{variant}s', () => {
results = null;
error = null;
let results = null;
let error = null;

before((done) => {
validate(
Expand All @@ -219,8 +219,8 @@ describe('Gavel proxies to functions with callbacks', () => {
});

describe('for similar #{variant}s', () => {
results = null;
error = null;
let results = null;
let error = null;

before((done) => {
validate(
Expand All @@ -241,8 +241,8 @@ describe('Gavel proxies to functions with callbacks', () => {
});

describe('for different #{variant}s', () => {
results = null;
error = null;
let results = null;
let error = null;

before((done) => {
validate(
Expand Down

0 comments on commit de6cfd9

Please sign in to comment.