{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/6801","repository_url":"https://api.github.com/repos/facebook/jest","labels_url":"https://api.github.com/repos/facebook/jest/issues/6801/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/6801/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/6801/events","html_url":"https://github.com/facebook/jest/issues/6801","id":347444073,"node_id":"MDU6SXNzdWUzNDc0NDQwNzM=","number":6801,"title":"jest-haste-map: duplicate manual mock found when the duplicate is in the build folder","user":{"login":"dagda1","id":118328,"node_id":"MDQ6VXNlcjExODMyOA==","avatar_url":"https://avatars0.githubusercontent.com/u/118328?v=4","gravatar_id":"","url":"https://api.github.com/users/dagda1","html_url":"https://github.com/dagda1","followers_url":"https://api.github.com/users/dagda1/followers","following_url":"https://api.github.com/users/dagda1/following{/other_user}","gists_url":"https://api.github.com/users/dagda1/gists{/gist_id}","starred_url":"https://api.github.com/users/dagda1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagda1/subscriptions","organizations_url":"https://api.github.com/users/dagda1/orgs","repos_url":"https://api.github.com/users/dagda1/repos","events_url":"https://api.github.com/users/dagda1/events{/privacy}","received_events_url":"https://api.github.com/users/dagda1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-03T15:37:34Z","updated_at":"2018-08-03T15:39:00Z","closed_at":"2018-08-03T15:39:00Z","author_association":"NONE","body":"I'm getting a warning from Jest for each manual mock I have, because it appears to be looking in the src directory and in the `dist` directory where I output my build.\r\n\r\nI get the \r\n\r\n```\r\njest-haste-map: duplicate manual mock found:\r\n  Module name: index\r\n  Duplicate Mock path: /Users/paul.cowan/projects/ds/payments/api/src/__mocks__/index.ts\r\nThis warning is caused by two manual mock files with the same file name.\r\nJest will use the mock file found in:\r\n/Users/paul.cowan/projects/ds/payments/api/src/__mocks__/index.ts\r\n Please delete one of the following two files:\r\n /Users/paul.cowan/projects/ds/payments/api/dist/__mocks__/index.js\r\n/Users/paul.cowan/projects/ds/payments/api/src/__mocks__/index.ts\r\n```\r\nI've tried mucking around with the exclude key in my tsconfig.json, but I can't find a glob pattern that matches all __mocks__ folders.\r\n\r\nI.e.` \"exclude\":[\"**/__mocks__/*\"]` but it still happens\r\n\r\n\r\n```{\r\n    rootDir: process.cwd(),\r\n    coverageDirectory: '<rootDir>/.coverage',\r\n    collectCoverageFrom: [\r\n      'src/**/*.{js,jsx,ts,tsx}',\r\n      '!src/**/*.d.ts',\r\n      '!src/**/*.test.*',\r\n      '!src/test/**/*.*',\r\n      '!src/features/**/*.*'\r\n    ],\r\n    setupFiles: ['@ds/common/scripts/tests/setupTests.js', '@ds/common/config/polyfills.js'],\r\n    testMatch: [\r\n      '<rootDir>/src/**/__tests__/**/*.ts?(x)',\r\n      '<rootDir>/src/**/?(*.)(spec|test).ts?(x)',\r\n      '<rootDir>/src/**/*.feature'\r\n    ],\r\n    testEnvironment: 'node',\r\n    testURL: 'http://localhost',\r\n    transform: {\r\n      '^.+\\\\.(ts|tsx)$': '<rootDir>/../../node_modules/ts-jest/preprocessor.js',\r\n      '^.+\\\\.feature$': 'gherkin-jest',\r\n      '^.+\\\\.css$': '@ds/common/jest/cssTransform.js',\r\n      '^.+\\\\.csv$': '@ds/common/jest/csvTransform.js',\r\n      '^(?!.*\\\\.(js|jsx|css|json)$)': '@ds/common/jest/fileTransform.js'\r\n    },\r\n    transformIgnorePatterns: ['[/\\\\\\\\](node_modules)[/\\\\\\\\].+\\\\.(js|jsx)$'],\r\n    moduleNameMapper: {\r\n      '^react-native$': 'react-native-web'\r\n    },\r\n    moduleFileExtensions: ['web.js', 'js', 'json', 'web.jsx', 'jsx', 'ts', 'tsx', 'feature', 'csv']```"}}
{"actor":{"display_login":"dagda1"}}