Skip to content

Commit

Permalink
more adjusts
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Nov 25, 2022
1 parent b7bfbba commit 1ba5be9
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 26 deletions.
2 changes: 1 addition & 1 deletion test/app/prompts.spec.cts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { JWT } from '../../jdl/jhipster/authentication-types';
import { CYPRESS } from '../../jdl/jhipster/test-framework-types';
import { ANGULAR } from '../../jdl/jhipster/client-framework-types';
import { MAVEN } from '../../jdl/jhipster/build-tool-types';
import { getGenerator } from '../support/index.cjs';
import { getGenerator } from '../support/index.mjs';

const mockedComposedGenerators = ['jhipster:common', 'jhipster:server', 'jhipster:client', 'jhipster:languages', 'jhipster:entity'];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import databaseTypes from '../../jdl/jhipster/database-types';
import clientFrameworkTypes from '../../jdl/jhipster/client-framework-types';
import authenticationTypes from '../../jdl/jhipster/authentication-types';
import cacheTypes from '../../jdl/jhipster/cache-types';
import testSupport from '../support/index.cjs';

const { getGenerator } = testSupport;
import { getGenerator } from '../support/index.mjs';

const { MYSQL, SQL, H2_MEMORY } = databaseTypes;
const { ANGULAR } = clientFrameworkTypes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,7 @@ import helpers from 'yeoman-test';
import expectedFiles from '../utils/expected-files.cjs';
import ClientGenerator from '../../generators/client/index.mjs';
import ServerGenerator from '../../generators/server/index.mjs';
import databaseTypes from '../../jdl/jhipster/database-types';
import clientFrameworkTypes from '../../jdl/jhipster/client-framework-types';
import authenticationTypes from '../../jdl/jhipster/authentication-types';
import cacheProviderTypes from '../../jdl/jhipster/cache-types';
import testSupport from '../support/index.cjs';

const { getGenerator } = testSupport;

const { MYSQL, SQL, H2_MEMORY } = databaseTypes;
const { ANGULAR } = clientFrameworkTypes;
const { JWT } = authenticationTypes;
const { EHCACHE } = cacheProviderTypes;
import { getGenerator } from '../support/index.mjs';

const mockClientBlueprintSubGen = class extends ClientGenerator {
constructor(args, opts, features) {
Expand Down
3 changes: 1 addition & 2 deletions test/cli/cli.spec.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ const Environment = require('yeoman-environment');
const helpers = require('yeoman-test');

const { createProgram, buildJHipster } = require('../../cli/program.cjs');
const { getJHipsterCli, prepareTempDir, copyFakeBlueprint, copyBlueprint, lnYeoman } = require('../utils/utils.cjs');
const { getTemplatePath, getJHipsterCli, prepareTempDir, copyFakeBlueprint, copyBlueprint, lnYeoman } = require('../utils/utils.cjs');
const { logger } = require('../../cli/utils.cjs');
const { getTemplatePath } = require('../support/index.cjs');

const jhipsterCli = require.resolve(path.join(__dirname, '..', '..', 'cli', 'cli.cjs'));

Expand Down
3 changes: 1 addition & 2 deletions test/cli/environment-builder.spec.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ const sinon = require('sinon');
const helpers = require('yeoman-test');

const EnvironmentBuilder = require('../../cli/environment-builder.cjs');
const { getTemplatePath } = require('../support/index.cjs');

const { prepareTempDir, revertTempDir, testInTempDir, copyBlueprint, lnYeoman } = require('../utils/utils.cjs');
const { getTemplatePath, prepareTempDir, revertTempDir, testInTempDir, copyBlueprint, lnYeoman } = require('../utils/utils.cjs');

describe('Environment builder', () => {
let cleanup;
Expand Down
3 changes: 1 addition & 2 deletions test/cli/import-jdl.spec.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ const assert = require('yeoman-assert');
const expect = require('chai').expect;
const utils = require('../../cli/utils.cjs');

const { testInTempDir, revertTempDir } = require('../utils/utils.cjs');
const { getTemplatePath } = require('../support/index.cjs');
const { getTemplatePath, testInTempDir, revertTempDir } = require('../utils/utils.cjs');

let subGenCallParams = {
count: 0,
Expand Down
2 changes: 1 addition & 1 deletion test/heroku.spec.mts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ChildProcess from 'child_process';
import { jestExpect as expect } from 'mocha-expect-snapshot';

import constants from '../generators/generator-constants.cjs';
import { getTemplatePath, getGenerator } from './support/index.cjs';
import { getTemplatePath, getGenerator } from './support/index.mjs';

const expectedFiles = {
monolith: [
Expand Down
6 changes: 3 additions & 3 deletions test/utils/utils.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ const os = require('os');
const fse = require('fs-extra');
const fs = require('fs');

const constants = require('../../generators/generator-constants.cjs');

const DOCKER_DIR = constants.DOCKER_DIR;
const FAKE_BLUEPRINT_DIR = path.join(__dirname, '../templates/fake-blueprint');

const getTemplatePath = (...templatePath) => path.resolve(__dirname, '../templates', ...templatePath);

module.exports = {
getJHipsterCli,
prepareTempDir,
Expand All @@ -18,6 +17,7 @@ module.exports = {
copyBlueprint,
copyFakeBlueprint,
lnYeoman,
getTemplatePath,
};

function getJHipsterCli() {
Expand Down

0 comments on commit 1ba5be9

Please sign in to comment.