nx/packages/next/src/generators/library/lib/normalize-options.spec.ts
Leosvel Pérez Espinosa f39c1f991e
cleanup(linter): deprecate the Linter enum (#30875)
Properly deprecate the `Linter` enum in favor of the `LinterType` union
type and remove unneeded internal usages.
2025-04-29 12:39:36 -04:00

26 lines
627 B
TypeScript

import type { Tree } from '@nx/devkit';
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
import { normalizeOptions } from './normalize-options';
describe('normalizeOptions', () => {
let tree: Tree;
beforeEach(() => {
tree = createTreeWithEmptyWorkspace();
});
it('should set importPath and projectRoot', async () => {
const options = await normalizeOptions(tree, {
directory: 'my-lib',
style: 'css',
linter: 'none',
unitTestRunner: 'jest',
});
expect(options).toMatchObject({
importPath: '@proj/my-lib',
projectRoot: 'my-lib',
});
});
});