Skip to content

Commit

Permalink
enable splitting by putting modules into separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Jan 30, 2025
1 parent 303e0d1 commit f5dbe9e
Show file tree
Hide file tree
Showing 21 changed files with 80 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 0);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 9);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 10);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 11);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 12);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 13);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 14);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 15);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 16);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 17);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 18);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 1);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 19);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 2);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 3);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 4);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 5);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 6);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 7);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runTestGroup } from './mutating-has-many-test-infra';

runTestGroup(20, 8);
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,27 @@ function getMutations(): Mutation[] {
];
}

const STATES: Array<{
startingState: { name: string; cb: (store: Store) => User };
mutation: Mutation;
}> = [];

getStartingState().forEach((startingState) => {
getMutations().forEach((mutation) => {
STATES.push({
startingState,
mutation,
});
});
});

export function runTestGroup(splitNum: number, offset: number) {
STATES.forEach(({ startingState, mutation }, index) => {
// Run only every Nth test, offset by 0
if (index % splitNum !== offset) {
return;
}

module(
`Integration | Relationships | Collection | Mutation > Starting state: ${startingState.name} > Mutation: ${mutation.name}`,
function (hooks) {
Expand Down Expand Up @@ -424,4 +443,4 @@ getStartingState().forEach((startingState) => {
}
);
});
});
}

0 comments on commit f5dbe9e

Please sign in to comment.