Skip to content

Commit cdcf2ee

Browse files
chore: address comments on PR
- fix lint error - update type to return false instead of null when tests should be run
1 parent ca2e9f4 commit cdcf2ee

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

test/integration/collection-management/collection_management.spec.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ const SKIPPED_TESTS = ['modifyCollection to changeStreamPreAndPostImages enabled
88

99
describe('Collection management unified spec tests', function () {
1010
runUnifiedSuite(loadSpecTests('collection-management'), ({ description }) =>
11-
SKIPPED_TESTS.includes(description) ? `the Node driver does not have a collMod helper.` : null
11+
SKIPPED_TESTS.includes(description) ? `the Node driver does not have a collMod helper.` : false
1212
);
1313
});

test/integration/command-monitoring/command_monitoring.spec.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ const SKIP = ['A successful unordered bulk write with an unacknowledged write co
1313

1414
describe('Command Monitoring Spec (unified)', () => {
1515
runUnifiedSuite(loadSpecTests(path.join('command-monitoring', 'unified')), ({ description }) =>
16-
SKIP.includes(description) ? `TODO(NODE-4261): support skip reasons in unified tests` : null
16+
SKIP.includes(description) ? `TODO(NODE-4261): support skip reasons in unified tests` : false
1717
);
1818
});

test/integration/load-balancers/load_balancers.spec.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const filter = ({ description }) => {
2222
// TODO(DRIVERS-1847): The above three tests are skipped pending a decision made in DRIVERS-1847
2323
// since pinning the connection on any getMore error is very awkward in node and likely results
2424
// in sub-optimal pinning.
25-
return 'TODO(DRIVERS-1847): Skipped pending a decision made on DRIVERS-1847'
25+
return 'TODO(DRIVERS-1847): Skipped pending a decision made on DRIVERS-1847';
2626
}
2727

2828
if (description === 'errors during the initial connection hello are ignored') {
@@ -44,7 +44,7 @@ const filter = ({ description }) => {
4444
return 'TODO(NODE-3891): fix tests broken when AUTH enabled';
4545
}
4646

47-
return null;
47+
return false;
4848
};
4949

5050
describe('Load Balancer Unified Tests', function () {

test/integration/unified-test-format/unified_test_format.spec.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const filter: TestFilter = ({ description }) => {
3737
return 'TODO(NODE-3891): fix tests broken when AUTH enabled';
3838
}
3939

40-
return null;
40+
return false;
4141
};
4242

4343
describe('Unified test format runner', function unifiedTestRunner() {

test/tools/unified-spec-runner/runner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export async function runUnifiedTest(
4444
ctx: Mocha.Context,
4545
unifiedSuite: uni.UnifiedSuite,
4646
test: uni.Test,
47-
skipFilter: uni.TestFilter = () => null
47+
skipFilter: uni.TestFilter = () => false
4848
): Promise<void> {
4949
// Some basic expectations we can catch early
5050
expect(test).to.exist;
@@ -253,7 +253,7 @@ export async function runUnifiedTest(
253253
*/
254254
export function runUnifiedSuite(
255255
specTests: uni.UnifiedSuite[],
256-
skipFilter: uni.TestFilter = () => null
256+
skipFilter: uni.TestFilter = () => false
257257
): void {
258258
for (const unifiedSuite of specTests) {
259259
context(String(unifiedSuite.description), function () {

test/tools/unified-spec-runner/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,4 +240,4 @@ export interface ExpectedError {
240240
/**
241241
* A type that represents the test filter provided to the unifed runner.
242242
*/
243-
export type TestFilter = (test: Test) => null | string;
243+
export type TestFilter = (test: Test) => string | false;

0 commit comments

Comments
 (0)