Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop quibble dependency #27610

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cli/cli.spec.mts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { execaCommandSync } from 'execa';
import type { GeneratorMeta } from '@yeoman/types';
import type FullEnvironment from 'yeoman-environment';
import { coerce } from 'semver';
import quibble from 'quibble';

import { defaultHelpers as helpers, createBlueprintFiles } from '../lib/testing/index.js';
import { getCommand as actualGetCommonand } from './utils.mjs';
Expand Down Expand Up @@ -96,7 +95,7 @@ describe('cli', () => {
let argv;

before(async () => {
await quibble.esm('./utils.mjs', { logger, getCommand, CLI_NAME: 'jhipster', done: () => {} });
await esmocha.mock('./utils.mjs', { logger, getCommand, CLI_NAME: 'jhipster', done: () => {} } as any);
const { buildJHipster } = await import('./program.mjs');

mockCli = async (argv: string[], opts = {}) => {
Expand All @@ -105,7 +104,7 @@ describe('cli', () => {
};
});
after(() => {
quibble.reset();
esmocha.reset();
});

beforeEach(async () => {
Expand Down
15 changes: 5 additions & 10 deletions generators/java/support/checks/check-java.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { after, before, describe, esmocha, expect, it, resetAllMocks } from 'esmocha';
import quibble from 'quibble';

const execa = { execa: esmocha.fn(), execaSync: esmocha.fn(), execaCommandSync: esmocha.fn(), execaCommand: esmocha.fn() };
const { execaCommandSync } = await esmocha.mock('execa', import('execa'));

const baseResult = {
cwd: '',
Expand All @@ -15,13 +14,9 @@ const baseResult = {
} as any;

describe('generator - server - checkJava', () => {
before(async () => {
await quibble.esm('execa', execa);
});
after(() => {
quibble.reset();
esmocha.reset();
});

afterEach(() => {
resetAllMocks();
});
Expand All @@ -31,7 +26,7 @@ describe('generator - server - checkJava', () => {
let result;

before(async () => {
execa.execaCommandSync.mockReturnValue({ ...baseResult, stderr });
execaCommandSync.mockReturnValue({ ...baseResult, stderr });
const { default: checkJava } = await import('./check-java.js');
result = checkJava([]);
});
Expand All @@ -50,7 +45,7 @@ describe('generator - server - checkJava', () => {
let result;

before(async () => {
execa.execaCommandSync.mockReturnValue({ ...baseResult, exitCode, stderr });
execaCommandSync.mockReturnValue({ ...baseResult, exitCode, stderr });
const { default: checkJava } = await import('./check-java.js');
result = checkJava([]);
});
Expand All @@ -64,7 +59,7 @@ describe('generator - server - checkJava', () => {
let result;

before(async () => {
execa.execaCommandSync.mockImplementation(() => {
execaCommandSync.mockImplementation(() => {
throw new Error('foo');
});
const { default: checkJava } = await import('./check-java.js');
Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@
"jsdoc": "4.0.3",
"open-cli": "8.0.0",
"prettier2": "npm:[email protected]",
"quibble": "0.9.2",
"rimraf": "5.0.7",
"sinon": "19.0.2",
"sinon-chai": "3.7.0",
Expand Down
Loading