* chore(react): move react schematics to generators * chore(react): update lib generators * chore(react): update redux generators * chore(react): move react story book generators * chore(react): add old implementation for update babel in next * chore(react): rename tsconfig json template files to include __tmpl__ * chore(react): update deps * chore(react): fix component template file * chore(react): remove angular-devkit deps * chore(react): remove angular-devkit deps
23 lines
702 B
TypeScript
23 lines
702 B
TypeScript
import { assertValidStyle } from './assertion';
|
|
|
|
describe('assertValidStyle', () => {
|
|
it('should accept style option values from app, lib, component schematics', () => {
|
|
const schemas = [
|
|
require('../generators/application/schema.json'),
|
|
require('../generators/component/schema.json'),
|
|
require('../generators/library/schema.json'),
|
|
];
|
|
|
|
schemas.forEach((schema) => {
|
|
const values = schema.properties.style['x-prompt'].items;
|
|
expect(() =>
|
|
values.forEach((value) => assertValidStyle(value)).not.toThrow()
|
|
);
|
|
});
|
|
});
|
|
|
|
it('should throw for invalid values', () => {
|
|
expect(() => assertValidStyle('bad')).toThrow(/Unsupported/);
|
|
});
|
|
});
|