1 | const assert = require('assert')
|
2 | const linter = require('./../../../lib/index')
|
3 | const funcWith = require('./../../common/contract-builder').funcWith
|
4 |
|
5 | describe('Linter - use-forbidden-name', () => {
|
6 | it('should raise forbidden name error', () => {
|
7 | const code = funcWith('uint l = 0;')
|
8 |
|
9 | const report = linter.processStr(code, {
|
10 | rules: { 'no-unused-vars': 'error', 'use-forbidden-name': 'error' }
|
11 | })
|
12 |
|
13 | assert.equal(report.errorCount, 2)
|
14 | assert.ok(report.messages[0].message.includes('Avoid to use'))
|
15 | })
|
16 | })
|