File tree 4 files changed +9
-4
lines changed
4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change
1
+ PUSHNOTICE_CHAT_ID=
2
+ PUSHNOTICE_CHAT_SECRET=
Original file line number Diff line number Diff line change
1
+ .env
1
2
* .sublime-project
2
3
* .sublime-workspace
3
4
node_modules
Original file line number Diff line number Diff line change 43
43
},
44
44
"devDependencies" : {
45
45
"ava" : " ^4.1.0" ,
46
+ "dotenv" : " ^16.0.0" ,
46
47
"npm-check-updates" : " ^12.5.4" ,
47
48
"xo" : " ^0.48.0"
48
49
}
Original file line number Diff line number Diff line change
1
+ import process from 'node:process'
2
+ import 'dotenv/config.js' // eslint-disable-line import/no-unassigned-import
1
3
import test from 'ava'
2
4
import pnotice from './index.js'
3
5
4
- // TODO: find a way to load config.chat from file?
5
6
const config = {
6
7
chat : {
7
- id : '' ,
8
- secret : '' ,
8
+ id : process . env . PUSHNOTICE_CHAT_ID ,
9
+ secret : process . env . PUSHNOTICE_CHAT_SECRET ,
9
10
} ,
10
11
}
11
12
12
- if ( config . chat . id !== '' ) {
13
+ if ( config . chat . id ) {
13
14
console . log ( 'Test file currently being run:' , test . meta . file )
14
15
15
16
test ( 'handle options.disabled = true' , async ( t ) => {
You can’t perform that action at this time.
0 commit comments