mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
21 lines
640 B
TypeScript
21 lines
640 B
TypeScript
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
|
|
import { Tree, readProjectConfiguration } from '@nx/devkit';
|
|
|
|
import { customLibraryGenerator } from './generator';
|
|
import { CustomLibraryGeneratorSchema } from './schema';
|
|
|
|
describe('custom-library generator', () => {
|
|
let tree: Tree;
|
|
const options: CustomLibraryGeneratorSchema = { name: 'test' };
|
|
|
|
beforeEach(() => {
|
|
tree = createTreeWithEmptyWorkspace();
|
|
});
|
|
|
|
it('should run successfully', async () => {
|
|
await customLibraryGenerator(tree, options);
|
|
const config = readProjectConfiguration(tree, 'test');
|
|
expect(config).toBeDefined();
|
|
});
|
|
});
|