-
-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(scripts): generate-package command generates jest.config.js
- Loading branch information
Showing
9 changed files
with
65 additions
and
7 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,11 @@ | ||
/** | ||
* Jest configuration for native packages. | ||
* Keeping this file next to the package.json file instead of providing configuration | ||
* with `-c ../../jest.config.native` option in package.json scripts | ||
* allows us to run jest tests directly from IDEs. | ||
*/ | ||
const { ...baseConfig } = require('../../jest.config.native'); | ||
|
||
module.exports = { | ||
...baseConfig, | ||
}; |
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,14 @@ | ||
{ | ||
"name": "suite-package-template", | ||
"version": "1.0.0", | ||
"main": "src/index", | ||
"license": "See LICENSE.md in repo root", | ||
"private": true, | ||
"sideEffects": false, | ||
"scripts": { | ||
"depcheck": "yarn g:depcheck", | ||
"type-check": "yarn g:tsc --build", | ||
"test:unit": "yarn g:jest" | ||
}, | ||
"dependencies": {} | ||
} |
7 changes: 7 additions & 0 deletions
7
scripts/package-template-native/src/__tests__/logHello.test.ts
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,7 @@ | ||
import { logHello } from '../logHello'; | ||
|
||
describe('hello logger', () => { | ||
it('logger returns true', () => { | ||
expect(logHello()).toBeTruthy(); | ||
}); | ||
}); |
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 @@ | ||
export { logHello } from './logHello'; |
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,5 @@ | ||
export const logHello = () => { | ||
console.log('hello world'); | ||
|
||
return true; | ||
}; |
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,5 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { "outDir": "libDev" }, | ||
"references": [] | ||
} |
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,11 @@ | ||
/** | ||
* Jest configuration for web packages. | ||
* Keeping this file next to the package.json file instead of providing configuration | ||
* with `-c ../../jest.config.base` option in package.json scripts | ||
* allows us to run jest tests directly from IDEs. | ||
*/ | ||
const { ...baseConfig } = require('../../jest.config.base'); | ||
|
||
module.exports = { | ||
...baseConfig, | ||
}; |
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