(ignoreFile: string, rules: string)
| 147 | 'src/build/node_modules/pkg/index.js': 'export const dep = 1;\n', |
| 148 | }; |
| 149 | const scope = (ignoreFile: string, rules: string): ReturnType<typeof buildScopeIgnore> => { |
| 150 | const root = tempDir(); |
| 151 | write(root, files); |
| 152 | gitRepo(root); |
| 153 | write(root, { [ignoreFile]: rules }); |
| 154 | return buildScopeIgnore(root); |
| 155 | }; |
| 156 | |
| 157 | // An explicit exclusion wins over the folder's source. |
| 158 | expect(scope('.gitignore', 'build/\n').ignores('src/build/page.tsx')).toBe(true); |
no test coverage detected