Skip to content

Commit

Permalink
tests: switch to runJHipster
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Sep 25, 2024
1 parent b1f1fad commit ee94528
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions generators/client/generator-needles.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { before, describe, it } from 'esmocha';
import { getGenerator, dryRunHelpers as helpers, result as runResult } from '../../lib/testing/index.js';
import { dryRunHelpers as helpers, result as runResult } from '../../lib/testing/index.js';
import { CLIENT_WEBPACK_DIR } from '../generator-constants.js';
import { clientFrameworkTypes } from '../../lib/jhipster/index.js';
import ClientGenerator from './index.js';
Expand All @@ -23,7 +23,7 @@ const mockBlueprintSubGen: any = class extends ClientGenerator {
describe('needle API Webpack: JHipster client generator with blueprint', () => {
function generateAppWithClientFramework(clientFramework) {
return helpers
.create(getGenerator('client'))
.runJHipster('client')
.withOptions({
blueprint: ['myblueprint'],
})
Expand All @@ -38,8 +38,7 @@ describe('needle API Webpack: JHipster client generator with blueprint', () => {
nativeLanguage: 'en',
languages: ['en', 'fr'],
})
.withGenerators([[mockBlueprintSubGen, { namespace: 'jhipster-myblueprint:client' }]])
.run();
.withGenerators([[mockBlueprintSubGen, { namespace: 'jhipster-myblueprint:client' }]]);
}

describe('Angular clientFramework', () => {
Expand Down
7 changes: 3 additions & 4 deletions test/needle-api/needle-client-angular.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { before, describe, it } from 'esmocha';
import { getGenerator, basicHelpers as helpers, result as runResult } from '../../lib/testing/index.js';
import { basicHelpers as helpers, result as runResult } from '../../lib/testing/index.js';

import { CLIENT_MAIN_SRC_DIR } from '../../generators/generator-constants.js';
import BaseApplicationGenerator from '../../generators/base-application/index.js';
Expand Down Expand Up @@ -33,15 +33,14 @@ const mockBlueprintSubGen = class extends AngularGenerator {
describe('needle API Angular: JHipster angular generator with blueprint', () => {
before(async () => {
await helpers
.create(getGenerator('angular'))
.runJHipster('angular')
.withJHipsterConfig({
skipServer: true,
})
.withOptions({
blueprint: ['myblueprint'],
})
.withGenerators([[mockBlueprintSubGen, { namespace: 'jhipster-myblueprint:angular' }]])
.run();
.withGenerators([[mockBlueprintSubGen, { namespace: 'jhipster-myblueprint:angular' }]]);
});

it('vendor.scss contains the specific change (without comment) added by needle api', () => {
Expand Down

0 comments on commit ee94528

Please sign in to comment.