File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1+ import { isGolangciLintV1 } from "../src/main"
2+
3+ describe ( 'isV1' , ( ) => {
4+ it ( 'should return false if the version is latest' , ( ) => {
5+ expect ( isGolangciLintV1 ( "latest" ) ) . toBe ( false ) ;
6+ } )
7+
8+ it ( 'should return true if the version is v1.x.x' , ( ) => {
9+ expect ( isGolangciLintV1 ( "v1.0.0" ) ) . toBe ( true ) ;
10+ } )
11+
12+ it ( 'should return true if the version is v2.x.x' , ( ) => {
13+ expect ( isGolangciLintV1 ( "v2.0.0" ) ) . toBe ( false ) ;
14+ } )
15+ } ) ;
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ async function run(): Promise<void> {
136136 }
137137}
138138
139- function isGolangciLintV1 ( version : string ) : boolean {
139+ export function isGolangciLintV1 ( version : string ) : boolean {
140140 if ( version === "latest" ) {
141141 return false ;
142142 }
You can’t perform that action at this time.
0 commit comments