{"size": 418, "ext": "js", "max_stars_repo_path": "tests/compilers/swaggerCompiler.test.js", "max_stars_repo_name": "Bucky24/ts-swagger-joi-converter", "max_stars_repo_stars_event_min_datetime": "2019-03-06T19:04:22.000Z", "max_stars_repo_stars_event_max_datetime": "2020-09-10T11:56:31.000Z", "max_issues_repo_path": "tests/compilers/swaggerCompiler.test.js", "max_issues_repo_name": "Bucky24/ts-swagger-joi-converter", "max_issues_repo_issues_event_min_datetime": "2019-10-04T21:54:53.000Z", "max_issues_repo_issues_event_max_datetime": "2019-10-04T22:57:13.000Z", "max_forks_repo_path": "tests/compilers/swaggerCompiler.test.js", "max_forks_repo_name": "Bucky24/ts-swagger-joi-converter", "max_forks_repo_forks_event_min_datetime": "2019-10-04T20:11:23.000Z", "max_forks_repo_forks_event_max_datetime": "2019-10-04T20:11:23.000Z"}
{"max_stars_count": 3, "max_issues_count": 2, "max_forks_count": 1, "avg_line_length": 26.125, "max_line_length": 86, "alphanum_fraction": 0.5598086124}
const Swagger = require('../../src/compilers/swaggerCompiler');

describe('swaggerCompiler', () => {
	describe('buildSwaggerField', () => {
		it('should use lowercase enum values', () => {
			const result = Swagger.buildSwaggerField({
				name: 'test',
				data: {
					enum: true,
					values: ['UPPER']
				}
			});
			expect(result).toEqual("      test:\n        type: string\n        enum: [upper]");
		});
	})
});