text: "use strict";
  
  // deps
  
  	// natives
  	const { join } = require("path");
  	const { strictEqual } = require("assert");
  
  	// locals
  
  		// plugin
  		const LocalMediator = require(join(__dirname, "utils", "Mediator", "LocalMediator.js"));
  
  // consts
  
  	const DESCRIPTOR = require(join(__dirname, "utils", "DescriptorUser", "DescriptorOnlyUrl.js"));
  
  // tests
  
  describe("Mediator / checkParameters / enum", () => {
  
  	const mediator = new LocalMediator({
  		"descriptor": DESCRIPTOR
  	});
  
  	before(() => {
  		return mediator.init();
  	});
  
  	after(() => {
  		return mediator.release();
  	});
  
  	it("should test missing params", (done) => {
  
  		mediator.checkParameters("testEnum", {
  			"path": {
  				"test": "test2"
  			},
  			"query": {},
  			"headers": {},
  			"cookies": {}
  		}, {}).then(() => {
  			done(new Error("There is no generated error"));
  		}).catch((err) => {
  
  			strictEqual(typeof err, "object", "Generated error is not as expected");
  			strictEqual(err instanceof ReferenceError, true, "Generated error is not as expected");
  
  			done();
  
  		});
  
  	});
  
  	it("should test wrong type", (done) => {
  
  		mediator.checkParameters("testEnum", {
  			"path": {
  				"path-param-enum": 3
  			},
  			"query": {},
  			"headers": {},
  			"cookies": {}
  		}, {}).then(() => {
  			done(new Error("There is no generated error"));
  		}).catch((err) => {
  
  			strictEqual(typeof err, "object", "Generated error is not as expected");
  			strictEqual(err instanceof TypeError, true, "Generated error is not as expected");
  
  			done();
  
  		});
  
  	});
  
  	it("should test out of enum", (done) => {
  
  		mediator.checkParameters("testEnum", {
  			"path": {
  				"path-param-enum": "test"
  			},
  			"query": {},
  			"headers": {},
  			"cookies": {}
  		}, {}).then(() => {
  			done(new Error("There is no generated error"));
  		}).catch((err) => {
  
  			strictEqual(typeof err, "object", "Generated error is not as expected");
  			strictEqual(err instanceof RangeError, true, "Generated error is not as expected");
  
  			done();
  
  		});
  
  	});
  
  	it("should test valid string data", () => {
  
  		return mediator.checkParameters("testEnum", {
  			"path": {
  				"path-param-enum": "test2"
  			},
  			"query": {},
  			"headers": {},
  			"cookies": {}
  		}, {});
  
  	});
  
  });
  