Skip to content

Commit 55fa203

Browse files
G-Rathljharb
authored andcommitted
[Tests] no-default-export, no-named-export: add test case
1 parent 6be20df commit 55fa203

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
2121
- [Performance] [`no-cycle`]: dont scc for each linted file ([#3068], thanks [@soryy708])
2222
- [Docs] [`no-cycle`]: add `disableScc` to docs ([#3070], thanks [@soryy708])
2323
- [Tests] use re-exported `RuleTester` ([#3071], thanks [@G-Rath])
24-
- [Docs] `no-restricted-paths`: fix grammar ([#3073], thanks [@unbeauvoyage])
24+
- [Docs] [`no-restricted-paths`]: fix grammar ([#3073], thanks [@unbeauvoyage])
25+
- [Tests] [`no-default-export`], [`no-named-export`]: add test case (thanks [@G-Rath])
2526

2627
## [2.30.0] - 2024-09-02
2728

tests/src/rules/no-default-export.js

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ const rule = require('rules/no-default-export');
77

88
ruleTester.run('no-default-export', rule, {
99
valid: [
10+
test({
11+
code: 'module.exports = function foo() {}',
12+
}),
1013
test({
1114
code: `
1215
export const foo = 'foo';

tests/src/rules/no-named-export.js

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ const rule = require('rules/no-named-export');
66

77
ruleTester.run('no-named-export', rule, {
88
valid: [].concat(
9+
test({
10+
code: 'module.export.foo = function () {}',
11+
}),
912
test({
1013
code: 'export default function bar() {};',
1114
}),

0 commit comments

Comments
 (0)