Skip to content

Commit

Permalink
test(unbound-method): don't run broken test when using `@typescript-e…
Browse files Browse the repository at this point in the history
…slint` v5
  • Loading branch information
G-Rath committed Mar 21, 2024
1 parent b709f7e commit b8d120d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rules/__tests__/unbound-method.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import path from 'path';
import { version as rawTypeScriptESLintPluginVersion } from '@typescript-eslint/eslint-plugin/package.json';
import { TSESLint } from '@typescript-eslint/utils';
import dedent from 'dedent';
import type { MessageIds, Options } from '../unbound-method';
Expand Down Expand Up @@ -252,7 +253,9 @@ ruleTester.run('unbound-method', requireRule(false), {
"['1', '2', '3'].map(Number.parseInt);",
'[5.2, 7.1, 3.6].map(Math.floor);',
'const x = console.log;',
'const x = Object.defineProperty;',
...(parseInt(rawTypeScriptESLintPluginVersion.split('.')[0], 10) >= 6
? ['const x = Object.defineProperty;']
: []),
...[
'instance.bound();',
'instance.unbound();',
Expand Down

0 comments on commit b8d120d

Please sign in to comment.