Skip to content

Commit

Permalink
update test message
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangnd25 committed Jun 30, 2023
1 parent 5b5d6a3 commit a3a9375
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/index_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from 'chai';
import jsonSchemaSupport from '../src';
import { Controller, ValidationError, plugin } from '@shortlyster/mongalisa';
import jsonSchemaSupport from '../src';

plugin(jsonSchemaSupport());

Expand Down Expand Up @@ -69,7 +69,7 @@ describe('JSON Schema validator plugin', () => {
} catch (error) {
expect(error).to.be.instanceof(ValidationError);
expect(error.message).to.eql(
'`email` must look like a email, `password` this is a required field'
'`email` must be a valid email, `password` this is a required field'
);
}
});
Expand All @@ -87,7 +87,7 @@ describe('JSON Schema validator plugin', () => {
await users.update(user, { email: 'hack!' });
} catch (error) {
expect(error).to.be.instanceof(ValidationError);
expect(error.message).to.eql('`email` must look like a email');
expect(error.message).to.eql('`email` must be a valid email');
}
});

Expand All @@ -108,7 +108,7 @@ describe('JSON Schema validator plugin', () => {
} catch (error) {
expect(error).to.be.instanceof(ValidationError);
expect(error.message).to.eql(
'`email` must look like a email, `password` this is a required field'
'`email` must be a valid email, `password` this is a required field'
);
}
});
Expand Down

0 comments on commit a3a9375

Please sign in to comment.