Skip to content

Commit

Permalink
eslint --fix .
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed May 26, 2021
1 parent fc72940 commit 37cad72
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion integration-test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('in afterEach mode', function () {
tmpDir,
`httpception.${runner}-${Math.round(10000000 * Math.random())}.test.js`
);
var testCommand;
let testCommand;
if (isMocha) {
testCommand = `${process.argv[0]} ${pathModule.resolve(
__dirname,
Expand Down
26 changes: 13 additions & 13 deletions lib/httpception.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
var UnexpectedMitmMocker = require('unexpected-mitm/lib/UnexpectedMitmMocker');
const UnexpectedMitmMocker = require('unexpected-mitm/lib/UnexpectedMitmMocker');

var resolveFromAfterEach;
var mocker;
var promise;
var promiseFactoryForCurrentTest;
var mockDefinitionForTheCurrentTest;
let resolveFromAfterEach;
let mocker;
let promise;
let promiseFactoryForCurrentTest;
let mockDefinitionForTheCurrentTest;

var afterEachRegistered = false;
let afterEachRegistered = false;
function ensureAfterEachIsRegistered() {
if (typeof afterEach === 'function' && !afterEachRegistered) {
afterEachRegistered = true;
afterEach(function () {
mockDefinitionForTheCurrentTest = undefined;
var promiseForThisTest = promise;
const promiseForThisTest = promise;
promise = undefined;
if (resolveFromAfterEach) {
resolveFromAfterEach();
Expand All @@ -23,14 +23,14 @@ function ensureAfterEachIsRegistered() {
}
}

var expect = require('unexpected').clone();
const expect = require('unexpected').clone();

expect.use(require('unexpected-mitm/lib/mockerAssertions'));

var originalChildMethod = expect.child;
const originalChildMethod = expect.child;
expect.child = function () {
// ...
var child = originalChildMethod.apply(expect, arguments);
const child = originalChildMethod.apply(expect, arguments);
child.notifyPendingPromise = function () {};
return child;
};
Expand Down Expand Up @@ -104,11 +104,11 @@ module.exports = function httpception(mockDefinition, promiseFactory) {
throw e;
});
} else if (!promise) {
var resolvePromise = expect.promise(function (resolve, reject) {
const resolvePromise = expect.promise(function (resolve, reject) {
resolveFromAfterEach = resolve;
});

var mockerPromise = expect.promise(function () {
const mockerPromise = expect.promise(function () {
return mocker.mock(function () {
return resolvePromise;
});
Expand Down

0 comments on commit 37cad72

Please sign in to comment.