Skip to content

Commit

Permalink
Avoid committing it.only (getredash#3995)
Browse files Browse the repository at this point in the history
* remove it.only, left by mistake

* use no-only-tests

* 'off' should be used instead of 'none'

* Dedup jest/only rule

* always error for .only
  • Loading branch information
Omer Lachish authored and arikfr committed Jul 19, 2019
1 parent c054ae8 commit c1f4147
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 77 deletions.
3 changes: 2 additions & 1 deletion client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
root: true,
extends: ["airbnb", "plugin:compat/recommended"],
plugins: ["jest", "compat"],
plugins: ["jest", "compat", "no-only-tests"],
settings: {
"import/resolver": "webpack"
},
Expand All @@ -27,6 +27,7 @@ module.exports = {
"no-control-regex": "off",
"no-multiple-empty-lines": "warn",
"no-script-url": "off", // some <a> tags should have href="javascript:void(0)"
"no-only-tests/no-only-tests": "error",
"operator-linebreak": "off",
"react/destructuring-assignment": "off",
"react/jsx-filename-extension": "off",
Expand Down
3 changes: 3 additions & 0 deletions client/app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ module.exports = {
env: {
"jest/globals": true,
},
rules: {
"jest/no-focused-tests": "off",
},
};
2 changes: 1 addition & 1 deletion client/cypress/integration/dashboard/dashboard_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ describe('Dashboard', () => {
});
};

it.only('when there are no parameters', function () {
it('when there are no parameters', function () {
addWidgetAndShareDashboard(this.dashboardUrl, 'select 1', {}, (secretAddress) => {
cy.logout();
cy.visit(secretAddress);
Expand Down
Loading

0 comments on commit c1f4147

Please sign in to comment.