Skip to content

Instantly share code, notes, and snippets.

@phenomnomnominal
Created September 16, 2018 07:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phenomnomnominal/001e38500d01effe3911f880cdd493ea to your computer and use it in GitHub Desktop.
Save phenomnomnominal/001e38500d01effe3911f880cdd493ea to your computer and use it in GitHub Desktop.
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