-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test cases for InstaPy setup checking if InstaPy files exist
- Loading branch information
Showing
3 changed files
with
6,415 additions
and
3,509 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
require('dotenv').config({ | ||
path: process.env.NODE_ENV === 'test' ? '.env.test' : '.env' | ||
}) | ||
const fs = require('fs') | ||
|
||
describe('Check if .env is setup corretly', () => { | ||
it('should locate InstaPy database', () => { | ||
dbFile = `${process.env.INSTAPY_FOLDER}/db/instapy.db` | ||
expect(fs.existsSync(dbFile)).toBeTruthy() | ||
}) | ||
|
||
it('should locate InstaPy log folder', () => { | ||
logsFolder = `${process.env.INSTAPY_FOLDER}/logs/` | ||
expect(fs.existsSync(logsFolder)).toBeTruthy() | ||
}) | ||
}) |
Oops, something went wrong.