question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New Rule: `no-replace-test-comments`

See original GitHub issue

What

  • disallow ‘Replace this with your real tests’ comments

Why

  • we should encourage folks to use ember-cli + generators
  • for those in a rush / without strong reviews, you end up with plenty of checked in test files that only have canary tests:
  // Replace this with your real tests.
  test('it exists', function (assert) {
    let service = this.owner.lookup('service:company');
    assert.ok(service);
  });
  • this rule will nudge developers to start writing a meaningful test earlier in the process

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bmishcommented, Mar 18, 2020

I actually don’t think we should have an autofixer for this. I would prefer to just update the Ember blueprint to add the // TODO: prefix in future generated comments.

0reactions
jakebixbyavalaracommented, Mar 19, 2020

Any of the folders here that have -test appended: https://github.com/emberjs/ember.js/tree/master/blueprints

Ember and Ember-Data include their own blueprints so we can change them with each respective version. The files contained in the various -files folders are the lodash templates used to generate the tests: https://github.com/emberjs/ember.js/blob/master/blueprints/controller-test/qunit-files/__root__/__testType__/__path__/__test__.js#L8

Read more comments on GitHub >

github_iconTop Results From Across the Web

Proposed Rules - GovInfo
The proposed rule would rescind certain regulatory changes made effective on November. 16, 2020 and implements new statutory.
Read more >
Changes To Implement Provisions of the Trademark ...
This action changes the effective date for the regulations published in the November 17, 2021, final rule that established new Office action ...
Read more >
What's New in 2022? Laws and Regulations Taking Effect in ...
2021 saw state and local legislatures shifting their focus away from COVID-19 measures back to traditional employment law matters.
Read more >
register - New York State Department of State - NY.gov
The law provides for a minimum 60-day public comment period after publication in the Register of every No- tice of Proposed Rule Making,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found