This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
generated from tophat/new-project-kit
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: exit successfully when submitting a listed add-on (#91)
* chore: add allowed channels constants * chore: tests * test: wip * test: wip use union fs * test: wip use memfs * test: wip * chore: use memfs * test: move mock to setup * chore: ensure caveat only applies for listed and autosign * chore: only check if folder exists
- Loading branch information
Showing
10 changed files
with
132 additions
and
88 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
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,3 +1,20 @@ | ||
const { fs } = require('memfs') | ||
const path = jest.requireActual('path') | ||
const fs = jest.requireActual('fs') | ||
const { vol } = require('memfs') | ||
const { ufs } = require('unionfs') | ||
|
||
module.exports = fs | ||
const { createWriteStream } = ufs | ||
ufs.createWriteStream = (...args) => { | ||
for (const _fs of ufs.fss) { | ||
try { | ||
if (_fs.existsSync(path.dirname(`${args[0]}`))) { | ||
return _fs.createWriteStream(args[0]) | ||
} | ||
} catch (e) { | ||
continue | ||
} | ||
} | ||
return createWriteStream(...args) | ||
} | ||
|
||
module.exports = ufs.use(vol).use(fs) |
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 @@ | ||
module.exports = jest.fn() |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
jest.mock('fs') | ||
jest.mock('web-ext') | ||
jest.mock('sign-addon') |
Oops, something went wrong.