forked from micromatch/micromatch
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
16,173 additions
and
10,820 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,35 @@ | ||
#!/usr/bin/env node | ||
/** | ||
* Jest config. | ||
* | ||
* @note PLEASE DO NOT EDIT THIS FILE! | ||
* @note This entire file will be updated automatically. | ||
* @note Instead of editing here, please review <https://github.com/clevercanyon/skeleton>. | ||
*/ | ||
/* eslint-env es2021, node */ | ||
|
||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import { dirname } from 'desm'; | ||
|
||
const __dirname = dirname(import.meta.url); | ||
const projDir = path.resolve(__dirname, '../../..'); | ||
|
||
/** | ||
* Defines Jest configuration. | ||
*/ | ||
export default async (/* {} */) => { | ||
const srcDir = path.resolve(projDir, './src'); | ||
const srcDirExists = fs.existsSync(srcDir); | ||
|
||
const testsDir = path.resolve(projDir, './tests'); | ||
const testsDirExists = fs.existsSync(testsDir); | ||
|
||
return { | ||
roots: [ | ||
...(srcDirExists ? [srcDir] : []), // | ||
...(testsDirExists ? [testsDir] : []), | ||
...(!srcDirExists && !testsDirExists ? [projDir] : []), | ||
], | ||
}; | ||
}; |
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,23 @@ | ||
/** | ||
* Jest config file. | ||
* | ||
* Jest is aware of this config file's location. | ||
* | ||
* @note CUSTOM EDITS ONLY PLEASE! | ||
* @note In the future this file will be updated automatically. | ||
* @note Only `<custom:start.../custom:end>` will be preserved below. | ||
*/ | ||
/* eslint-env es2021, node */ | ||
|
||
import { $obj } from '@clevercanyon/utilities'; | ||
import baseConfig from './dev/.files/jest/config.mjs'; | ||
|
||
/* | ||
* Customizations. | ||
* <custom:start> */ | ||
|
||
export default async (jest) => { | ||
return $obj.mc.merge({}, await baseConfig(jest), {}); | ||
}; | ||
|
||
/* </custom:end> */ |
Oops, something went wrong.