-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* list firefox profiles * rename getPath to getCookiesPath * working chrome profile listing * Update index.ts * fix audit * add firefox list profiles test * getpath tests * list chrome profiles test * bump
- Loading branch information
1 parent
dd60dc5
commit 96908db
Showing
9 changed files
with
836 additions
and
677 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
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,27 @@ | ||
import mockFs from 'mock-fs'; | ||
import { listChromeProfiles } from '.'; | ||
|
||
jest.mock('../../src/chrome/util', () => ({ | ||
getPath: jest.fn().mockReturnValue('some/path'), | ||
})); | ||
|
||
describe('list chrome profiles', () => { | ||
it('should return Default', async () => { | ||
mockFs({ | ||
'some/path': { | ||
'System Profile': { | ||
Preferences: '', | ||
}, | ||
Default: { | ||
Preferences: '', | ||
}, | ||
}, | ||
}); | ||
|
||
const profiles = await listChromeProfiles(); | ||
|
||
expect(profiles).toEqual(['Default']); | ||
|
||
mockFs.restore(); | ||
}); | ||
}); |
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
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
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
Oops, something went wrong.