diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-11-24 15:05:03 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-11-24 15:05:03 -0400 |
commit | eab0e06d148b5445feab453b8042d5e93e1fa1a2 (patch) | |
tree | 62dab7600a89ca73cd1bffc19092c97fe4d58450 /test/unit/data/things/validators.js | |
parent | ca30b07b9e116f6d42d6ea6a2623e1500c289383 (diff) | |
parent | 9f58ba688c8a6ac3acf7b4bc435e2ccaed20b011 (diff) |
Merge branch 'commentary-entries' into preview
Diffstat (limited to 'test/unit/data/things/validators.js')
-rw-r--r-- | test/unit/data/things/validators.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/test/unit/data/things/validators.js b/test/unit/data/things/validators.js index bb33bf86..aa56a10e 100644 --- a/test/unit/data/things/validators.js +++ b/test/unit/data/things/validators.js @@ -149,13 +149,18 @@ t.test('isColor', t => { }); t.test('isCommentary', t => { - t.plan(6); + t.plan(9); + + // TODO: Test specific error messages. t.ok(isCommentary(`<i>Toby Fox:</i>\ndogsong.mp3`)); - t.ok(isCommentary(`Technically, this works:</i>`)); - t.ok(isCommentary(`<i><b>Whodunnit:</b></i>`)); - t.throws(() => isCommentary(123), TypeError); - t.throws(() => isCommentary(``), TypeError); - t.throws(() => isCommentary(`<i><u>Toby Fox:</u></i>`)); + t.ok(isCommentary(`<i>Toby Fox:</i> (music)\ndogsong.mp3`)); + t.throws(() => isCommentary(`dogsong.mp3\n<i>Toby Fox:</i>\ndogsong.mp3`)); + t.throws(() => isCommentary(`<i>Toby Fox:</i> dogsong.mp3`)); + t.throws(() => isCommentary(`<i>Toby Fox:</i> (music) dogsong.mp3`)); + t.throws(() => isCommentary(`<i>I Have Nothing To Say:</i>`)); + t.throws(() => isCommentary(123)); + t.throws(() => isCommentary(``)); + t.throws(() => isCommentary(`Technically, ah, er:</i>\nCorrect`)); }); t.test('isContribution', t => { |