diff --git a/.eslintrc.json b/.eslintrc.json index def79e2ff4..e0215ff988 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,6 +23,21 @@ "es6": true }, "rules": { + "no-restricted-properties": [ + "error", + { + "object": "describe", + "property": "only" + }, + { + "object": "it", + "property": "only" + }, + { + "object": "context", + "property": "only" + } + ], "prettier/prettier": "error", "tsdoc/syntax": "warn", "no-console": "error", diff --git a/test/functional/change_stream_spec.test.js b/test/functional/change_stream_spec.test.js index 5deeed04f1..06943387a2 100644 --- a/test/functional/change_stream_spec.test.js +++ b/test/functional/change_stream_spec.test.js @@ -83,7 +83,10 @@ describe('Change Stream Spec - v1', function () { suite.tests.forEach(test => { const shouldSkip = test.skip || TESTS_TO_SKIP.has(test.description); - const itFn = shouldSkip ? it.skip : test.only ? it.only : it; + // There's no evidence of test.only being defined in the spec files + // But let's avoid removing it now to just be sure we aren't changing anything + // These tests will eventually be replaced by unified format versions. + const itFn = shouldSkip ? it.skip : test.only ? Reflect.get(it, 'only') : it; const metadata = generateMetadata(test); const testFn = generateTestFn(test);