-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continue addressing code review and feedback
- Loading branch information
1 parent
330a66c
commit bb7628d
Showing
21 changed files
with
239 additions
and
267 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,3 @@ | |
|
||
# compiled by tsc from /src/electron/ | ||
/public | ||
|
||
# rest resources | ||
/src/utils/resources |
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,22 @@ | ||
const createMockArchiver = () => { | ||
// TODO: this code should live in __mocks__/archiver.js | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const { PassThrough } = require('stream'); | ||
let mockStream; | ||
// return a fake stream when "archiver()" is called in the app | ||
const ctor = function() { | ||
mockStream = new PassThrough(); | ||
mockStream.file = jest.fn(); | ||
mockStream.directory = jest.fn(); | ||
mockStream.append = jest.fn(); | ||
mockStream.finalize = jest.fn(); | ||
return mockStream; | ||
}; | ||
// attach a func to emit events on the stream from the tests | ||
ctor.mockEmit = (event, data) => mockStream.emit(event, data); | ||
|
||
return ctor; | ||
}; | ||
|
||
export default createMockArchiver(); |
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
module.exports = { | ||
outputFile: jest.fn(), | ||
writeFile: jest.fn(), | ||
pathExists: jest.fn(), | ||
readFile: jest.fn(), | ||
remove: jest.fn(), | ||
ensureDir: jest.fn(), | ||
copyFile: jest.fn(), | ||
copy: jest.fn(), | ||
createWriteStream: jest.fn(), | ||
createReadStream: jest.fn(), | ||
}; |
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
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.