'use strict';

const { getWordsList } = require('../../utilities');

const enumTest = (name, values) => ({
  test (arg) {
    const { [name]: value } = arg;

    if (value == null) { return true; }

    return values.includes(value);
  },
  message: `'${name}' must be ${getWordsList(values, { json: true })}`,
});

module.exports = {
  enumTest,
};

@@ -112,25 +112,8 @@
 st (
-arg) %7B%0A    const 
 %7B %5Bn
@@ -129,16 +129,11 @@
 ue %7D
- = arg;%0A
+) %7B
 %0A   

Fix duplication