Skip to content

Commit 0d6f14e

Browse files
Run integration/firestore tests for Firestore code changes (#3127)
1 parent 7de1a7c commit 0d6f14e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/run_changed.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ const specialPaths = {
7070
'packages/database'
7171
],
7272
'scripts/emulator-testing/firestore-test-runner.ts': ['packages/firestore'],
73-
'scripts/emulator-testing/database-test-runner.ts': ['packages/database']
73+
'scripts/emulator-testing/database-test-runner.ts': ['packages/database'],
74+
'packages/firestore': ['integration/firestore']
7475
};
7576

7677
/**
@@ -95,8 +96,11 @@ async function getChangedPackages() {
9596
return { testAll: true };
9697
}
9798
// Files outside a package dir that should trigger its tests.
98-
if (specialPaths[filename]) {
99-
for (const targetPackage of specialPaths[filename]) {
99+
const matchingSpecialPaths = Object.keys(specialPaths).filter(path =>
100+
filename.startsWith(path)
101+
);
102+
for (const matchingSpecialPath of matchingSpecialPaths) {
103+
for (const targetPackage of specialPaths[matchingSpecialPath]) {
100104
changedPackages[targetPackage] = 'dependency';
101105
}
102106
}

0 commit comments

Comments
 (0)