Skip to content

Instantly share code, notes, and snippets.

@phenomnomnominal
Last active September 16, 2018 08:17
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/85b73d248f847ffb50a018da6f8d49b5 to your computer and use it in GitHub Desktop.
Save phenomnomnominal/85b73d248f847ffb50a018da6f8d49b5 to your computer and use it in GitHub Desktop.
it('should create a lint fix if "fdescribe()" is used', () => {
const sourceFile = tsquery.ast(`
fdescribe();
`);
const rule = new Rule({ ruleArguments: [] });
const errors = rule.apply(sourceFile);
const [error] = errors;
expect(error.hasFix()).to.equal(true);
expect((error.getFix() as Replacement).text).to.equal('describe');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment