isValidPath.js 638 B

1234567891011121314151617181920212223242526272829
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', {
  3. value: true
  4. });
  5. exports.default = isValidPath;
  6. function _jestSnapshot() {
  7. const data = require('jest-snapshot');
  8. _jestSnapshot = function () {
  9. return data;
  10. };
  11. return data;
  12. }
  13. /**
  14. * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
  15. *
  16. * This source code is licensed under the MIT license found in the
  17. * LICENSE file in the root directory of this source tree.
  18. */
  19. function isValidPath(globalConfig, filePath) {
  20. return (
  21. !filePath.includes(globalConfig.coverageDirectory) &&
  22. !(0, _jestSnapshot().isSnapshotPath)(filePath)
  23. );
  24. }