Install prettier and eslint

This commit is contained in:
Eric Mc Sween
2020-09-11 15:59:33 -04:00
parent c530422f1e
commit 971a768c4e
14 changed files with 1102 additions and 804 deletions
+34 -37
View File
@@ -3,45 +3,42 @@
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const chai = require('chai');
const should = chai.should();
const {
expect
} = chai;
const path = require('path');
const modulePath = path.join(__dirname, '../../../event_loop.js');
const SandboxedModule = require('sandboxed-module');
const sinon = require("sinon");
const chai = require('chai')
const { expect } = chai
const path = require('path')
const modulePath = path.join(__dirname, '../../../event_loop.js')
const SandboxedModule = require('sandboxed-module')
const sinon = require('sinon')
describe('event_loop', function() {
before(function() {
this.metrics = {
timing: sinon.stub(),
registerDestructor: sinon.stub()
}
this.logger = {
warn: sinon.stub()
}
return (this.event_loop = SandboxedModule.require(modulePath, {
requires: {
'./index': this.metrics
}
}))
})
before(function() {
this.metrics = {
timing: sinon.stub(),
registerDestructor: sinon.stub()
};
this.logger = {
warn: sinon.stub()
};
return this.event_loop = SandboxedModule.require(modulePath, { requires: {
'./index': this.metrics
}
}
);
});
describe('with a logger provided', function() {
before(function() {
return this.event_loop.monitor(this.logger)
})
describe('with a logger provided', function() {
before(function() {
return this.event_loop.monitor(this.logger);
});
return it('should register a destructor with metrics', function() {
return this.metrics.registerDestructor.called.should.equal(true);
});
});
return describe('without a logger provided', () => it('should throw an exception', function() {
return expect(this.event_loop.monitor).to.throw('logger is undefined');
}));
});
return it('should register a destructor with metrics', function() {
return expect(this.metrics.registerDestructor.called).to.equal(true)
})
})
return describe('without a logger provided', function() {
return it('should throw an exception', function() {
return expect(this.event_loop.monitor).to.throw('logger is undefined')
})
})
})