Browse Source

chore: updates the message of InvalidOperatorValueError

e22m4u 2 years ago
parent
commit
60a142f088

+ 1 - 1
src/errors/invalid-operator-value-error.js

@@ -14,7 +14,7 @@ export class InvalidOperatorValueError extends Error {
   constructor(operator, expected, value) {
     super(
       format(
-        'Condition of {%s: ...} should have %s, %v given.',
+        'Condition of {%s: ...} should have %s, but %v given.',
         operator,
         expected,
         value,

+ 1 - 1
src/errors/invalid-operator-value-error.spec.js

@@ -5,7 +5,7 @@ describe('InvalidOperatorValueError', function () {
   it('sets specific message', function () {
     const error = new InvalidOperatorValueError('exists', 'a boolean', '');
     const message =
-      'Condition of {exists: ...} should have a boolean, "" given.';
+      'Condition of {exists: ...} should have a boolean, but "" given.';
     expect(error.message).to.be.eq(message);
   });
 });