mirror of
https://git.proxmox.com/git/pve-eslint
synced 2025-08-17 20:47:01 +00:00

includes a (minimal) working wrapper Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
31 lines
867 B
JavaScript
31 lines
867 B
JavaScript
/**
|
|
* @fileoverview Tests for the no-negated-in-lhs rule
|
|
* @author Michael Ficarra
|
|
* @deprecated in ESLint v3.3.0
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Requirements
|
|
//------------------------------------------------------------------------------
|
|
|
|
const rule = require("../../../lib/rules/no-negated-in-lhs"),
|
|
{ RuleTester } = require("../../../lib/rule-tester");
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Tests
|
|
//------------------------------------------------------------------------------
|
|
|
|
const ruleTester = new RuleTester();
|
|
|
|
ruleTester.run("no-negated-in-lhs", rule, {
|
|
valid: [
|
|
"a in b",
|
|
"!(a in b)"
|
|
],
|
|
invalid: [
|
|
{ code: "!a in b", errors: [{ messageId: "negatedLHS", type: "BinaryExpression" }] }
|
|
]
|
|
});
|