Skip to content

Commit

Permalink
fix: Update dependencies (#105)
Browse files Browse the repository at this point in the history
Co-authored-by: Trygve Lie <trygve.lie@finn.no>
  • Loading branch information
trygve-lie and Trygve Lie authored May 2, 2023
1 parent 555f8ec commit c9892fa
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion benchmark/cache.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const benchmark = require('benchmark');
const Cache = require('../');
const Cache = require('..');

const suite = new benchmark.Suite();

Expand Down
2 changes: 1 addition & 1 deletion lib/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ const TtlMemCache = class TtlMemCache extends stream.Duplex {
return entry.key;
}
return undefined;
}).filter(item => item);
}).filter((item) => item);
}

length() {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
},
"homepage": "https://github.com/trygve-lie/ttl-mem-cache#readme",
"devDependencies": {
"eslint": "6.5.1",
"eslint-config-airbnb-base": "14.0.0",
"eslint-plugin-import": "2.18.2",
"eslint": "8.39.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-plugin-import": "2.27.5",
"benchmark": "2.1.4",
"tap": "14.8.2",
"lolex": "5.1.1"
"tap": "16.3.4",
"lolex": "6.0.0"
},
"dependencies": {
"readable-stream": "^3.3.0"
"readable-stream": "4.3.0"
}
}
4 changes: 2 additions & 2 deletions test/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const stream = require('readable-stream');
const lolex = require('lolex');
const tap = require('tap');
const Cache = require('../');
const Cache = require('..');

const srcObjectStream = (arr) => {
return new stream.Readable({
Expand Down Expand Up @@ -559,7 +559,7 @@ tap.test('cache.dump() - dump cache - should return Array with all entries', (t)

const dump = cache.dump();

t.true(Array.isArray(dump));
t.ok(Array.isArray(dump));
t.equal(dump.length, 2);
t.end();
});
Expand Down
32 changes: 16 additions & 16 deletions test/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ tap.test('.expired() - expire time is in front of now - should return "false"',

clock.tick(1000);

t.false(entry.expired());
t.notOk(entry.expired());

clock.uninstall();
t.end();
Expand All @@ -173,7 +173,7 @@ tap.test('.expired() - expire time is behind of now - should return "true"', (t)

clock.tick(4000);

t.true(entry.expired());
t.ok(entry.expired());

clock.uninstall();
t.end();
Expand All @@ -191,7 +191,7 @@ tap.test('.expired() - "now" argument is provided - expire time is in front of n

clock.tick(4000);

t.false(entry.expired(1000));
t.notOk(entry.expired(1000));

clock.uninstall();
t.end();
Expand All @@ -209,7 +209,7 @@ tap.test('.expired() - "now" argument is provided - expire time is behind of now

clock.tick(1000);

t.true(entry.expired(4000));
t.ok(entry.expired(4000));

clock.uninstall();
t.end();
Expand Down Expand Up @@ -286,7 +286,7 @@ tap.test('.assertLoose() - Entry object - should return true', (t) => {
ttl: 2000,
origin: 'source',
});
t.true(Entry.assertLoose(entry));
t.ok(Entry.assertLoose(entry));
t.end();
});

Expand All @@ -297,7 +297,7 @@ tap.test('.assertLoose() - Object literal with "key" and "value" - should return
ttl: 2000,
origin: 'source',
};
t.true(Entry.assertLoose(entry));
t.ok(Entry.assertLoose(entry));
t.end();
});

Expand All @@ -307,7 +307,7 @@ tap.test('.assertLoose() - Object literal without "key" - should return false',
ttl: 2000,
origin: 'source',
};
t.false(Entry.assertLoose(entry));
t.notOk(Entry.assertLoose(entry));
t.end();
});

Expand All @@ -317,17 +317,17 @@ tap.test('.assertLoose() - Object literal without "value" - should return false'
ttl: 2000,
origin: 'source',
};
t.false(Entry.assertLoose(entry));
t.notOk(Entry.assertLoose(entry));
t.end();
});

tap.test('.assertLoose() - Object literal without "key" and "value" - should return false', (t) => {
t.false(Entry.assertLoose({}));
t.notOk(Entry.assertLoose({}));
t.end();
});

tap.test('.assertLoose() - No argument - should return false', (t) => {
t.false(Entry.assertLoose());
t.notOk(Entry.assertLoose());
t.end();
});

Expand All @@ -342,7 +342,7 @@ tap.test('.assertStrict() - x - should return true', (t) => {
ttl: 2000,
origin: 'source',
});
t.true(Entry.assertStrict(entry));
t.ok(Entry.assertStrict(entry));
t.end();
});

Expand All @@ -353,7 +353,7 @@ tap.test('.assertStrict() - Object literal with "key", "value" and "ttl" - shoul
ttl: 2000,
origin: 'source',
};
t.true(Entry.assertStrict(entry));
t.ok(Entry.assertStrict(entry));
t.end();
});

Expand All @@ -363,7 +363,7 @@ tap.test('.assertStrict() - Object literal without "key" - should return false',
ttl: 2000,
origin: 'source',
};
t.false(Entry.assertStrict(entry));
t.notOk(Entry.assertStrict(entry));
t.end();
});

Expand All @@ -373,7 +373,7 @@ tap.test('.assertStrict() - Object literal without "value" - should return false
ttl: 2000,
origin: 'source',
};
t.false(Entry.assertStrict(entry));
t.notOk(Entry.assertStrict(entry));
t.end();
});

Expand All @@ -383,12 +383,12 @@ tap.test('.assertStrict() - Object literal without "ttl" - should return false',
value: 'foo',
origin: 'source',
};
t.false(Entry.assertStrict(entry));
t.notOk(Entry.assertStrict(entry));
t.end();
});

tap.test('.assertStrict() - No argument - should return false', (t) => {
t.false(Entry.assertStrict());
t.notOk(Entry.assertStrict());
t.end();
});

Expand Down
46 changes: 23 additions & 23 deletions test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,25 @@ tap.test('utils.calculateExpire() - empty argument - should return now timestamp
*/

tap.test('utils.expired() - empty argument - should return true', (t) => {
t.true(utils.expired());
t.ok(utils.expired());
t.end();
});

tap.test('utils.expired() - "expires" is Infinity - should return false', (t) => {
const expires = Infinity;
t.false(utils.expired(expires));
t.notOk(utils.expired(expires));
t.end();
});

tap.test('utils.expired() - "expires" is behind Date.now() - should return true', (t) => {
const expires = Date.now() - 100000;
t.true(utils.expired(expires));
t.ok(utils.expired(expires));
t.end();
});

tap.test('utils.expired() - "expires" is in front of Date.now() - should return false', (t) => {
const expires = Date.now() + 100000;
t.false(utils.expired(expires));
t.notOk(utils.expired(expires));
t.end();
});

Expand All @@ -63,20 +63,20 @@ tap.test('utils.expired() - "expires" is in front of Date.now() - should return
*/

tap.test('utils.isEmpty() - value is not empty - should return false', (t) => {
t.false(utils.isEmpty('foo'));
t.false(utils.isEmpty(1));
t.false(utils.isEmpty({}));
t.false(utils.isEmpty([1]));
t.notOk(utils.isEmpty('foo'));
t.notOk(utils.isEmpty(1));
t.notOk(utils.isEmpty({}));
t.notOk(utils.isEmpty([1]));
t.end();
});

tap.test('utils.isEmpty() - value is "null" - should return true', (t) => {
t.true(utils.isEmpty(null));
t.ok(utils.isEmpty(null));
t.end();
});

tap.test('utils.isEmpty() - value is "undefined" - should return true', (t) => {
t.true(utils.isEmpty(undefined));
t.ok(utils.isEmpty(undefined));
t.end();
});

Expand All @@ -85,20 +85,20 @@ tap.test('utils.isEmpty() - value is "undefined" - should return true', (t) => {
*/

tap.test('utils.isNotEmpty() - value is not empty - should return true', (t) => {
t.true(utils.isNotEmpty('foo'));
t.true(utils.isNotEmpty(1));
t.true(utils.isNotEmpty({}));
t.true(utils.isNotEmpty([1]));
t.ok(utils.isNotEmpty('foo'));
t.ok(utils.isNotEmpty(1));
t.ok(utils.isNotEmpty({}));
t.ok(utils.isNotEmpty([1]));
t.end();
});

tap.test('utils.isNotEmpty() - value is "null" - should return false', (t) => {
t.false(utils.isNotEmpty(null));
t.notOk(utils.isNotEmpty(null));
t.end();
});

tap.test('utils.isNotEmpty() - value is "undefined" - should return false', (t) => {
t.false(utils.isNotEmpty(undefined));
t.notOk(utils.isNotEmpty(undefined));
t.end();
});

Expand All @@ -107,11 +107,11 @@ tap.test('utils.isNotEmpty() - value is "undefined" - should return false', (t)
*/

tap.test('utils.isFunction() - value is not a function - should return false', (t) => {
t.false(utils.isFunction());
t.false(utils.isFunction('foo'));
t.false(utils.isFunction(1));
t.false(utils.isFunction({}));
t.false(utils.isFunction([1]));
t.notOk(utils.isFunction());
t.notOk(utils.isFunction('foo'));
t.notOk(utils.isFunction(1));
t.notOk(utils.isFunction({}));
t.notOk(utils.isFunction([1]));
t.end();
});

Expand All @@ -122,7 +122,7 @@ tap.test('utils.isFunction() - value is a function - should return true', (t) =>
const arr = (x) => {
return x;
};
t.true(utils.isFunction(fn));
t.true(utils.isFunction(arr));
t.ok(utils.isFunction(fn));
t.ok(utils.isFunction(arr));
t.end();
});

0 comments on commit c9892fa

Please sign in to comment.