From c30114f0e37eec74bf218aa37496b835bf72fb4b Mon Sep 17 00:00:00 2001 From: uzlopak Date: Sun, 7 Apr 2024 09:23:46 +0200 Subject: [PATCH] cache: improve test coverage --- test/cache/cache.js | 12 ++++++++++++ test/cache/cachestorage.js | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 test/cache/cache.js create mode 100644 test/cache/cachestorage.js diff --git a/test/cache/cache.js b/test/cache/cache.js new file mode 100644 index 00000000000..4a6b1ba960f --- /dev/null +++ b/test/cache/cache.js @@ -0,0 +1,12 @@ +'use strict' + +const { throws } = require('node:assert') +const { test } = require('node:test') +const { Cache } = require('../../lib/web/cache/cache') + +test('constructor', () => { + throws(() => new Cache(null), { + name: 'TypeError', + message: 'TypeError: Illegal constructor' + }) +}) diff --git a/test/cache/cachestorage.js b/test/cache/cachestorage.js new file mode 100644 index 00000000000..ba648f1197f --- /dev/null +++ b/test/cache/cachestorage.js @@ -0,0 +1,12 @@ +'use strict' + +const { throws } = require('node:assert') +const { test } = require('node:test') +const { CacheStorage } = require('../../lib/web/cache/cachestorage') + +test('constructor', () => { + throws(() => new CacheStorage(null), { + name: 'TypeError', + message: 'TypeError: Illegal constructor' + }) +})