Browse Source

Test expired returns false for valid cache

pull/7/head
Luke Childs 8 years ago
parent
commit
cf6816c766
  1. 10
      test/expired.js

10
test/expired.js

@ -4,3 +4,13 @@ import expired from '../';
test('expired is a function', t => {
t.is(typeof expired, 'function');
});
test('expired returns false for valid cache', t => {
const headers = {
date: new Date().toUTCString(),
age: 0,
'cache-control': 'public, max-age=300'
};
t.false(expired(headers));
});

Loading…
Cancel
Save