Skip to content

Commit

Permalink
cache: improve test coverage (#3063)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Apr 7, 2024
1 parent 5575749 commit e5ae400
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions 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'
})
})
12 changes: 12 additions & 0 deletions 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'
})
})

0 comments on commit e5ae400

Please sign in to comment.