« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/test/unit/data/cacheable-object.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/data/cacheable-object.js')
-rw-r--r--test/unit/data/cacheable-object.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/unit/data/cacheable-object.js b/test/unit/data/cacheable-object.js
index 4b927248..4be31788 100644
--- a/test/unit/data/cacheable-object.js
+++ b/test/unit/data/cacheable-object.js
@@ -2,10 +2,14 @@ import t from 'tap';
 
 import CacheableObject from '#cacheable-object';
 
-function newCacheableObject(PD) {
-  return new (class extends CacheableObject {
-    static [CacheableObject.propertyDescriptors] = PD;
-  });
+function newCacheableObject(propertyDescriptors) {
+  const constructor = class extends CacheableObject {
+    static [CacheableObject.propertyDescriptors] = propertyDescriptors;
+  };
+
+  constructor.finalizeCacheableObjectPrototype();
+
+  return Reflect.construct(constructor, []);
 }
 
 t.test(`CacheableObject simple separate update & expose`, t => {