Created
September 16, 2018 07:03
-
-
Save phenomnomnominal/001e38500d01effe3911f880cdd493ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { tsquery } from '@phenomnomnominal/tsquery'; | |
import { IOptions, Replacement } from 'tslint'; | |
import { expect } from 'chai'; | |
import { Rule } from './noFdescribeOrFitRule'; | |
describe('noFdescribeOrFitRule', () => { | |
it('should create a lint error if "fdescribe()" is used', () => { | |
const sourceFile = tsquery.ast(` | |
fdescribe(); | |
`); | |
const rule = new Rule({ ruleArguments: [] }); | |
const errors = rule.apply(sourceFile); | |
const [error] = errors; | |
expect(errors.length).to.equal(1); | |
expect(error.getFailure()).to.include(`Remember to remove "fdescribe" once you have finished working on tests.`); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment