Files
angular-challenges/libs/custom-plugin/src/generators/custom-library/generator.spec.ts
2023-06-19 22:09:54 +02:00

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();
});
});