web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
939 B

  1. const testBoilerplate = (name, author, description) => `/* eslint-env jest */
  2. /**
  3. * @fileoverview ${description}
  4. * @author ${author}
  5. */
  6. // -----------------------------------------------------------------------------
  7. // Requirements
  8. // -----------------------------------------------------------------------------
  9. import { RuleTester } from 'eslint';
  10. import parserOptionsMapper from '../../__util__/parserOptionsMapper';
  11. import rule from '../../../src/rules/${name}';
  12. // -----------------------------------------------------------------------------
  13. // Tests
  14. // -----------------------------------------------------------------------------
  15. const ruleTester = new RuleTester();
  16. const expectedError = {
  17. message: '',
  18. type: 'JSXOpeningElement',
  19. };
  20. ruleTester.run('${name}', rule, {
  21. valid: [
  22. { code: '<div />;' },
  23. ].map(parserOptionsMapper),
  24. invalid: [].map(parserOptionsMapper),
  25. });
  26. `;
  27. module.exports = testBoilerplate;