@@ -14,7 +14,7 @@ describe('check-environment module test suite', () => {
14
14
process . platform = 'win32' ;
15
15
// When - Then
16
16
expect ( checkEnvironment ) . toThrow (
17
- 'Unsupported OS, action only works in Ubuntu 18, 20, or 22 '
17
+ 'Unsupported OS, action only works in Ubuntu 18, 20, 22, or 24 '
18
18
) ;
19
19
} ) ;
20
20
test ( 'OS is Linux but not Ubuntu, should throw Error' , ( ) => {
@@ -24,7 +24,7 @@ describe('check-environment module test suite', () => {
24
24
fs . readFileSync . mockImplementation ( ( ) => 'SOME DIFFERENT OS' ) ;
25
25
// When - Then
26
26
expect ( checkEnvironment ) . toThrow (
27
- 'Unsupported OS, action only works in Ubuntu 18, 20, or 22 '
27
+ 'Unsupported OS, action only works in Ubuntu 18, 20, 22, or 24 '
28
28
) ;
29
29
expect ( fs . existsSync ) . toHaveBeenCalled ( ) ;
30
30
expect ( fs . readFileSync ) . toHaveBeenCalledTimes ( 0 ) ;
@@ -36,7 +36,7 @@ describe('check-environment module test suite', () => {
36
36
fs . readFileSync . mockImplementation ( ( ) => 'SOME DIFFERENT OS' ) ;
37
37
// When - Then
38
38
expect ( checkEnvironment ) . toThrow (
39
- 'Unsupported OS, action only works in Ubuntu 18, 20, or 22 '
39
+ 'Unsupported OS, action only works in Ubuntu 18, 20, 22, or 24 '
40
40
) ;
41
41
expect ( fs . existsSync ) . toHaveBeenCalled ( ) ;
42
42
expect ( fs . readFileSync ) . toHaveBeenCalled ( ) ;
@@ -80,5 +80,18 @@ describe('check-environment module test suite', () => {
80
80
// When - Then
81
81
expect ( checkEnvironment ) . not . toThrow ( ) ;
82
82
} ) ;
83
+ test ( 'OS is Linux and Ubuntu 24, should not throw Error' , ( ) => {
84
+ // Given
85
+ Object . defineProperty ( process , 'platform' , { value : 'linux' } ) ;
86
+ fs . existsSync . mockImplementation ( ( ) => true ) ;
87
+ fs . readFileSync . mockImplementation (
88
+ ( ) => `
89
+ NAME="Ubuntu"
90
+ VERSION="24.04.1 LTS (Noble Numbat)"
91
+ `
92
+ ) ;
93
+ // When - Then
94
+ expect ( checkEnvironment ) . not . toThrow ( ) ;
95
+ } ) ;
83
96
} ) ;
84
97
} ) ;
0 commit comments