You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 line
426 B

4 年之前
  1. 'use strict';
  2. function settingFor(settings, propertyName, fallback) {
  3. const value = settings[`mocha/${propertyName}`];
  4. const mochaSettings = settings.mocha || {};
  5. return value || mochaSettings[propertyName] || fallback;
  6. }
  7. module.exports = {
  8. getAddtionalNames(settings) {
  9. const additionalCustomNames = settingFor(settings, 'additionalCustomNames', []);
  10. return additionalCustomNames;
  11. }
  12. };