Skip to content

Commit

Permalink
add comma follow suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Oct 23, 2023
1 parent ae3c3a7 commit 6309021
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions generators/jdl/generator.spec.mts
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ describe(`generator - ${generator}`, () => {
inline: 'entity Foo {}',
baseName: 'jhipster',
}),
).rejects.toThrow("The JDL object, the application's name and its the database type are mandatory.");
).rejects.toThrow("The JDL object, the application's name, and its the database type are mandatory.");
});
it('without baseName should reject', async () => {
await expect(
helpers.runJHipster(GENERATOR_JDL).withOptions({
inline: 'entity Foo {}',
db: 'postgresql',
}),
).rejects.toThrow("The JDL object, the application's name and its the database type are mandatory.");
).rejects.toThrow("The JDL object, the application's name, and its the database type are mandatory.");
});

describe('with valid parameters', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,21 @@ describe('jdl - JDLWithoutApplicationToJSONConverter', () => {
it('should throw an error', () => {
expect(() => {
convert();
}).to.throw(/^The JDL object, the application's name and its the database type are mandatory\.$/);
}).to.throw(/^The JDL object, the application's name, and its the database type are mandatory\.$/);
});
});
context('such as an no database type', () => {
it('should throw an error', () => {
expect(() => {
convert({ jdlObject: new JDLObject(), applicationName: 'toto' });
}).to.throw(/^The JDL object, the application's name and its the database type are mandatory\.$/);
}).to.throw(/^The JDL object, the application's name, and its the database type are mandatory\.$/);
});
});
context('such as no application name', () => {
it('should throw an error', () => {
expect(() => {
convert({ jdlObject: new JDLObject(), databaseType: 'sql' });
}).to.throw(/^The JDL object, the application's name and its the database type are mandatory\.$/);
}).to.throw(/^The JDL object, the application's name, and its the database type are mandatory\.$/);
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default {
*/
export function convert(args: any = {}) {
if (!args.jdlObject || !args.applicationName || !args.databaseType) {
throw new Error("The JDL object, the application's name and its the database type are mandatory.");
throw new Error("The JDL object, the application's name, and its the database type are mandatory.");
}
init(args);
setBasicEntityInformation();
Expand Down

0 comments on commit 6309021

Please sign in to comment.