Skip to content

Commit

Permalink
[chore] disallow test.only tests during linting (sveltejs#4757)
Browse files Browse the repository at this point in the history
* [chore] disallow test.only tests during linting

* fix test.only test
  • Loading branch information
Conduitry authored Apr 27, 2022
1 parent 4cd2f89 commit c06af36
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@
},
"settings": {
"import/ignore": "/template/"
},
"rules": {
"no-restricted-properties": [
"error",
{ "object": "test", "property": "only", "message": "Do not check in test.only tests." }
]
}
}
3 changes: 2 additions & 1 deletion packages/kit/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"rules": {
"no-restricted-properties": [
"error",
{ "property": "substr", "message": "Use .slice instead of .substr." }
{ "property": "substr", "message": "Use .slice instead of .substr." },
{ "object": "test", "property": "only", "message": "Do not check in test.only tests." }
],
"@typescript-eslint/no-empty-interface": "off"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ test('errors on duplicate layout definition', () => {
);
});

test.only('errors on recursive name layout', () => {
test('errors on recursive name layout', () => {
assert.throws(
() => create('samples/named-layout-recursive-1'),
/Recursive layout detected: samples\/named-layout-recursive-1\/__layout-a@b\.svelte -> samples\/named-layout-recursive-1\/__layout-b@a\.svelte -> samples\/named-layout-recursive-1\/__layout-a@b\.svelte/
Expand Down

0 comments on commit c06af36

Please sign in to comment.