Skip to content

Commit

Permalink
fix(build-env): fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Sep 14, 2024
1 parent 578d2d4 commit 0c83deb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 19 deletions.
10 changes: 5 additions & 5 deletions tooling/build-env/src/executors/bootstrap/executor.unit-test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import runBootstrapExecutor from './executor';
import * as bootstrapEnvModule from './bootstrap-env';
import { beforeEach, expect, vi } from 'vitest';
import { beforeEach, expect, vi, it, describe } from 'vitest';
import { logger } from '@nx/devkit';

vi.mock('@nx/devkit', async () => {
Expand Down Expand Up @@ -55,13 +55,13 @@ describe('runBootstrapExecutor', () => {
)
).resolves.toStrictEqual({
success: true,
command: 'Bootstraped environemnt successfully.',
command: 'Bootstraped environment successfully.',
});

expect(logger.error).not.toHaveBeenCalled();
expect(logger.info).toHaveBeenCalledTimes(1);
expect(logger.info).toHaveBeenCalledWith(
'Execute @org/build-env:build with options: {}'
'Execute @org/build-env:bootstrap with options: {}'
);

expect(bootstrapEnvironmentSpy).toHaveBeenCalledTimes(1);
Expand Down Expand Up @@ -96,7 +96,7 @@ describe('runBootstrapExecutor', () => {
)
).resolves.toStrictEqual({
success: true,
command: 'Bootstraped environemnt successfully.',
command: 'Bootstraped environment successfully.',
});

expect(bootstrapEnvironmentSpy).toHaveBeenCalledWith(
Expand Down Expand Up @@ -135,7 +135,7 @@ describe('runBootstrapExecutor', () => {

expect(logger.info).toHaveBeenCalledTimes(1);
expect(logger.info).toHaveBeenCalledWith(
'Execute @org/build-env:build with options: {}'
'Execute @org/build-env:bootstrap with options: {}'
);

expect(logger.error).toHaveBeenCalledTimes(1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { describe, it, expect } from 'vitest';
import { describe, it, expect, vi } from 'vitest';
import { parseRegistryData, startVerdaccioServer } from './verdaccio-registry';
import { executeProcess } from '../utils/execute-process';
import type { ChildProcess } from 'node:child_process'; // Adjust import path
import { executeProcess } from '../../internal/execute-process';
import { ChildProcess } from 'node:child_process';
import { logger } from '@nx/devkit';

vi.mock('../utils/execute-process');
vi.mock('../../internal/execute-process');

vi.mock('@nx/devkit', async () => {
const actual = await vi.importActual('@nx/devkit');
Expand Down Expand Up @@ -89,7 +89,7 @@ describe('startVerdaccioServer', () => {
projectName: 'test-project',
});

expect(result).toEqual({
expect(result).toStrictEqual({
registry: {
pid: 12345,
storage: expect.any(String),
Expand Down
6 changes: 1 addition & 5 deletions tooling/build-env/src/executors/setup/executor.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
type ExecutorContext,
logger,
readJsonFile,
} from '@nx/devkit';
import { type ExecutorContext, logger, readJsonFile } from '@nx/devkit';
import { join } from 'node:path';
import runBootstrapExecutor from '../bootstrap/executor';
import runKillProcessExecutor from '../kill-process/executor';
Expand Down
5 changes: 1 addition & 4 deletions tooling/build-env/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
export {
getEnvironmentsRoot,
getEnvironmentRoot,
} from './internal/utils/setup';
export { getEnvironmentsRoot, getEnvironmentRoot } from './internal/setup';
export { createNodes } from './plugin/plugin';

0 comments on commit 0c83deb

Please sign in to comment.