-
-
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.
Chore: (tests) moves load to factory
- Loading branch information
1 parent
4ffb878
commit 4acb941
Showing
8 changed files
with
26 additions
and
22 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
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,7 +1,13 @@ | ||
import path from 'path'; | ||
|
||
const isBuild = process.env.BUILD && [ '1', 'true' ].includes(process.env.BUILD); | ||
const entry = process.env.ENTRY && path.resolve(process.env.ENTRY) | ||
|| isBuild && path.resolve(__dirname, '../lib') | ||
|| path.resolve(__dirname, '../src'); | ||
|
||
const tmpFolder = path.join(__dirname, '../tmp/tests'); | ||
|
||
export { | ||
tmpFolder | ||
tmpFolder, | ||
entry | ||
}; |
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,19 +1,5 @@ | ||
/* eslint-disable security/detect-non-literal-require */ | ||
import path from 'path'; | ||
|
||
const isBuild = process.env.BUILD && [ '1', 'true' ].includes(process.env.BUILD); | ||
const entry = process.env.ENTRY && path.resolve(process.env.ENTRY) | ||
|| isBuild && path.resolve(__dirname, '../lib') | ||
|| path.resolve(__dirname, '../src'); | ||
import { entry } from './constants'; | ||
|
||
export default require(entry); | ||
module.exports = require(entry); | ||
function _load(relPath) { | ||
return require(path.join(entry, relPath)); | ||
} | ||
|
||
_load.resolve = function (relPath) { | ||
return require.resolve(path.join(entry, relPath)); | ||
}; | ||
|
||
export { _load }; |
Empty file.
This file was deleted.
Oops, something went wrong.