File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ "use strict"
2+
3+ const assert = require ( "assert" )
4+ const pkg = require ( "eslint-plugin-n" )
5+
6+ describe ( "flat configs" , ( ) => {
7+ it ( "should correctly export the plugin" , ( ) => {
8+ assert . strictEqual ( typeof pkg , "object" )
9+ assert . strictEqual ( pkg . meta . name , "eslint-plugin-n" )
10+ assert ( pkg . configs )
11+ assert ( pkg . rules )
12+ } )
13+
14+ it ( "should export flat/recommended-module" , ( ) => {
15+ const config = pkg . configs [ "flat/recommended-module" ]
16+ assert . strictEqual ( config . plugins . n , pkg )
17+ assert ( config . rules , "should have rules configured" )
18+ } )
19+
20+ it ( "should export flat/recommeded-script" , ( ) => {
21+ const config = pkg . configs [ "flat/recommended-script" ]
22+ assert . strictEqual ( config . plugins . n , pkg )
23+ assert ( config . rules , "should have rules configured" )
24+ } )
25+
26+ it ( "should export flat/all" , ( ) => {
27+ const config = pkg . configs [ "flat/all" ]
28+ assert . strictEqual ( config . plugins . n , pkg )
29+ assert ( config . rules , "should have rules configured" )
30+ } )
31+ } )
You can’t perform that action at this time.
0 commit comments