mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-12 20:15:40 +00:00
fix(metrics): enforce exact runtime inventory
This commit is contained in:
1 parent
426dc541a9
commit
306a8276b3
7 files changed
+258
-160
No files matched your search
@@ -0,0 +1,12 @@
|
||||
function isTestFile(filePath) {
|
||||
const normalizedPath = filePath.replace(/\\/g, '/');
|
||||
return (
|
||||
/(^|\/)(__tests__|__mocks__|fixtures)(\/|$)/.test(normalizedPath) ||
|
||||
/(^|\/)(tests?|test-fixtures)(\/|$)/.test(normalizedPath) ||
|
||||
/\.(test|spec)\.[^.]+$/.test(normalizedPath)
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isTestFile,
|
||||
};
|
||||
Reference in new issue
Block a user