Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Sep 7, 2023
1 parent 0acea65 commit e444a69
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions tests/lib/rule-tester/rule-tester.js
Expand Up @@ -2580,32 +2580,6 @@ describe("RuleTester", () => {

});

it("should emit a deprecation warning when CodePath#currentSegments is accessed", () => {

const useCurrentSegmentsRule = {
create: () => ({
onCodePathStart(codePath) {
codePath.currentSegments.forEach(() => {});
}
})
};

ruleTester.run("use-current-segments", useCurrentSegmentsRule, {
valid: ["foo"],
invalid: []
});

assert.strictEqual(processStub.callCount, 1, "calls `process.emitWarning()` once");
assert.deepStrictEqual(
processStub.getCall(0).args,
[
"\"use-current-segments\" rule uses CodePath#currentSegments and will stop working in ESLint v9. Please read the documentation for how to update your code: https://eslint.org/docs/latest/extend/code-path-analysis#usage-examples",
"DeprecationWarning"
]
);

});

});

/**
Expand Down

0 comments on commit e444a69

Please sign in to comment.