« get me outta code hell

data, test: wrap property value errors with proper class & cause - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/test/unit/data/things
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-10-18 14:26:49 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-10-18 14:26:49 -0300
commit645a127bef38c3a7a2ef1b94d23b25fb7bdc4191 (patch)
tree6f9cce852c51dc5f74482b0fba89cfad877437f8 /test/unit/data/things
parent4e2dae523e7bf8b49272bd6afcba86a8157af4a1 (diff)
data, test: wrap property value errors with proper class & cause
Diffstat (limited to 'test/unit/data/things')
-rw-r--r--test/unit/data/things/track.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/unit/data/things/track.js b/test/unit/data/things/track.js
index 06a4041d..806efbf1 100644
--- a/test/unit/data/things/track.js
+++ b/test/unit/data/things/track.js
@@ -208,7 +208,8 @@ t.test(`Track.color`, t => {
   t.equal(track.color, '#123456',
     `color #4: is own value`);
 
-  t.throws(() => { track.color = '#aeiouw'; }, TypeError,
+  t.throws(() => { track.color = '#aeiouw'; },
+    {cause: TypeError},
     `color #5: must be set to valid color`);
 });