diff --git a/generators/jdl/generator.spec.mts b/generators/jdl/generator.spec.mts index cb8bbf129405..ac5a9e1fd319 100644 --- a/generators/jdl/generator.spec.mts +++ b/generators/jdl/generator.spec.mts @@ -68,7 +68,7 @@ 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( @@ -76,7 +76,7 @@ describe(`generator - ${generator}`, () => { 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', () => { diff --git a/jdl/converters/jdl-to-json/jdl-without-application-to-json-converter.spec.ts b/jdl/converters/jdl-to-json/jdl-without-application-to-json-converter.spec.ts index 2ddcc454002c..03c4d2fda204 100644 --- a/jdl/converters/jdl-to-json/jdl-without-application-to-json-converter.spec.ts +++ b/jdl/converters/jdl-to-json/jdl-without-application-to-json-converter.spec.ts @@ -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\.$/); }); }); }); diff --git a/jdl/converters/jdl-to-json/jdl-without-application-to-json-converter.ts b/jdl/converters/jdl-to-json/jdl-without-application-to-json-converter.ts index 68c01aa2f17c..922a3840878b 100644 --- a/jdl/converters/jdl-to-json/jdl-without-application-to-json-converter.ts +++ b/jdl/converters/jdl-to-json/jdl-without-application-to-json-converter.ts @@ -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();