Skip to content

Commit

Permalink
[Tests] no-default-export, no-named-export: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath authored and ljharb committed Sep 26, 2024
1 parent 6be20df commit 55fa203
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
- [Performance] [`no-cycle`]: dont scc for each linted file ([#3068], thanks [@soryy708])
- [Docs] [`no-cycle`]: add `disableScc` to docs ([#3070], thanks [@soryy708])
- [Tests] use re-exported `RuleTester` ([#3071], thanks [@G-Rath])
- [Docs] `no-restricted-paths`: fix grammar ([#3073], thanks [@unbeauvoyage])
- [Docs] [`no-restricted-paths`]: fix grammar ([#3073], thanks [@unbeauvoyage])
- [Tests] [`no-default-export`], [`no-named-export`]: add test case (thanks [@G-Rath])

## [2.30.0] - 2024-09-02

Expand Down
3 changes: 3 additions & 0 deletions tests/src/rules/no-default-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const rule = require('rules/no-default-export');

ruleTester.run('no-default-export', rule, {
valid: [
test({
code: 'module.exports = function foo() {}',
}),
test({
code: `
export const foo = 'foo';
Expand Down
3 changes: 3 additions & 0 deletions tests/src/rules/no-named-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const rule = require('rules/no-named-export');

ruleTester.run('no-named-export', rule, {
valid: [].concat(
test({
code: 'module.export.foo = function () {}',
}),
test({
code: 'export default function bar() {};',
}),
Expand Down

0 comments on commit 55fa203

Please sign in to comment.