Merge pull request #594 from 0xProject/improvement/addCustomTslintRules

Add more tslint rules
This commit is contained in:
Fabio Berger
2018-05-22 18:04:50 +02:00
committed by GitHub
59 changed files with 421 additions and 127 deletions

View File

@@ -12,6 +12,7 @@ const expect = chai.expect;
describe('instructions', () => {
describe('#getPcToInstructionIndexMapping', () => {
it('correctly maps pcs to instruction indexed', () => {
// tslint:disable-next-line:custom-no-magic-numbers
const bytecode = new Uint8Array([constants.PUSH1, 42, constants.PUSH2, 1, 2, constants.TIMESTAMP]);
const pcToInstruction = getPcToInstructionIndexMapping(bytecode);
const expectedPcToInstruction = { '0': 0, '2': 1, '5': 2 };