You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
585 B

'use strict';
require('../common');
const RuleTester = require('../../tools/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/inspector-check');
const message = 'Please add a skipIfInspectorDisabled() call to allow this ' +
'test to be skippped when Node is built ' +
'\'--without-inspector\'.';
new RuleTester().run('inspector-check', rule, {
valid: [
'foo;',
'common.skipIfInspectorDisabled(); require("inspector");'
],
invalid: [
{
code: 'require("inspector")',
errors: [{ message }]
}
]
});