File tree Expand file tree Collapse file tree 4 files changed +32
-35
lines changed Expand file tree Collapse file tree 4 files changed +32
-35
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- name : Jest Test
1
+ name : Initialize TLighthouse and Test using Jest
2
2
3
3
on :
4
4
pull_request :
24
24
run : npm ci
25
25
26
26
- name : Test with Jest
27
- run : npm test
27
+ run : npm test
28
+
29
+ running :
30
+ name : Install and Run
31
+
32
+ runs-on : ubuntu-latest
33
+
34
+ strategy :
35
+ matrix :
36
+ node-version : [16.x, 18.x, 20.x]
37
+
38
+ steps :
39
+ - uses : actions/checkout@v3
40
+
41
+ - name : Set up Chrome
42
+ uses : browser-actions/setup-chrome@v1
43
+
44
+ - name : Install
45
+ run : npm ci
46
+
47
+ - name : Running the program
48
+ run : npm start
Original file line number Diff line number Diff line change 1
- import { existsSync , copyFileSync } from 'fs'
1
+ import { copyIfNotExists } from "./src/lib/utilities.class.js" ;
2
2
3
- if ( ! existsSync ( './src/urlList.class.js' ) ) copyFileSync ( './src/urlList.class.example' , './src/urlList.class.js ' )
3
+ copyIfNotExists ( './src/urlList.class.js' , './src/urlList.class.example ' )
Original file line number Diff line number Diff line change
1
+ import { existsSync , copyFileSync } from 'fs'
2
+
1
3
class Utility {
2
4
LoggerType = {
3
5
'info' : "Info" ,
@@ -22,6 +24,10 @@ class Utility {
22
24
if ( condition ) console . log ( `${ typeFormatted } ` , text )
23
25
}
24
26
27
+ copyIfNotExists = ( location , source ) => {
28
+ if ( ! existsSync ( location ) ) copyFileSync ( source , location )
29
+ }
30
+
25
31
#isArrayEmpty = ( data = [ ] ) => {
26
32
return ( data === undefined || data . length === 0 ) ? false : true
27
33
}
@@ -34,4 +40,4 @@ class Utility {
34
40
}
35
41
36
42
export default new Utility ( )
37
- export const { Logger, LoggerType } = new Utility ( )
43
+ export const { Logger, LoggerType, copyIfNotExists } = new Utility ( )
You can’t perform that action at this time.
0 commit comments