summaryrefslogtreecommitdiff
path: root/test/cache-map.test.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-16 19:33:24 -0500
committerGitHub <noreply@github.com>2024-02-17 00:33:24 +0000
commit1e69210b53151f31140bb1fbdc9f3d71fa181630 (patch)
treec8e824b531bf0fc46897ee7cf93fe375b5da946e /test/cache-map.test.js
parent9432e4bb117869860db0aaa42a318fe73002d1c5 (diff)
Make vitests idiomatic (#677)
Diffstat (limited to 'test/cache-map.test.js')
-rw-r--r--test/cache-map.test.js18
1 files changed, 2 insertions, 16 deletions
diff --git a/test/cache-map.test.js b/test/cache-map.test.js
index 9be5363a..e7a8b836 100644
--- a/test/cache-map.test.js
+++ b/test/cache-map.test.js
@@ -19,8 +19,7 @@
import {describe, expect, test} from 'vitest';
import {CacheMap} from '../ext/js/general/cache-map.js';
-/** */
-function testConstructor() {
+describe('CacheMap', () => {
describe('constructor', () => {
const shouldThrow = [-1, 1.5, Number.NaN, Number.POSITIVE_INFINITY];
const shouldNotThrow = [0, 1, Number.MAX_VALUE];
@@ -32,10 +31,7 @@ function testConstructor() {
expect(() => new CacheMap(param)).toThrowError();
});
});
-}
-/** */
-function testApi() {
describe('api', () => {
/* eslint-disable @stylistic/no-multi-spaces */
const data = [
@@ -111,14 +107,4 @@ function testApi() {
expect(cache.size).toStrictEqual(expectedSize);
});
});
-}
-
-
-/** */
-function main() {
- testConstructor();
- testApi();
-}
-
-
-main();
+});