Use Prettier JS (#5017)

* Adds prettier

* Run lint before tests
This commit is contained in:
Florent Vilmart
2018-09-01 13:58:06 -04:00
committed by GitHub
parent 189cd259ee
commit d83a0b6808
240 changed files with 41098 additions and 29020 deletions

View File

@@ -1,12 +1,13 @@
const NullCacheAdapter = require('../lib/Adapters/Cache/NullCacheAdapter').default;
const NullCacheAdapter = require('../lib/Adapters/Cache/NullCacheAdapter')
.default;
describe('NullCacheAdapter', function() {
const KEY = 'hello';
const VALUE = 'world';
it('should expose promisifyed methods', (done) => {
it('should expose promisifyed methods', done => {
const cache = new NullCacheAdapter({
ttl: NaN
ttl: NaN,
});
// Verify all methods return promises.
@@ -14,24 +15,24 @@ describe('NullCacheAdapter', function() {
cache.put(KEY, VALUE),
cache.del(KEY),
cache.get(KEY),
cache.clear()
cache.clear(),
]).then(() => {
done();
});
});
it('should get/set/clear', (done) => {
it('should get/set/clear', done => {
const cache = new NullCacheAdapter({
ttl: NaN
ttl: NaN,
});
cache.put(KEY, VALUE)
cache
.put(KEY, VALUE)
.then(() => cache.get(KEY))
.then((value) => expect(value).toEqual(null))
.then(value => expect(value).toEqual(null))
.then(() => cache.clear())
.then(() => cache.get(KEY))
.then((value) => expect(value).toEqual(null))
.then(value => expect(value).toEqual(null))
.then(done);
});
});