Skip to content

Commit

Permalink
test: refactor example apps to be in one project
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl committed Jul 28, 2024
1 parent 2d283fe commit 6d8063a
Show file tree
Hide file tree
Showing 65 changed files with 6,323 additions and 34,250 deletions.
1 change: 1 addition & 0 deletions examples/js-with-babel/jest-esm-isolated.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createJsWithBabelEsmPreset } from 'ts-jest'

/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
displayName: 'js-with-babel',
...createJsWithBabelEsmPreset({
babelConfig: true,
tsconfig: 'tsconfig-esm.json',
Expand Down
1 change: 1 addition & 0 deletions examples/js-with-babel/jest-esm.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createJsWithBabelEsmPreset } from 'ts-jest'

/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
displayName: 'js-with-babel',
...createJsWithBabelEsmPreset({
babelConfig: true,
tsconfig: 'tsconfig-esm.json'
Expand Down
1 change: 1 addition & 0 deletions examples/js-with-babel/jest-isolated.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { createJsWithBabelPreset } = require('ts-jest')

/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
displayName: 'js-with-babel',
...createJsWithBabelPreset({
babelConfig: true,
isolatedModules: true,
Expand Down
1 change: 1 addition & 0 deletions examples/js-with-babel/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { createJsWithBabelPreset } = require('ts-jest')

/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
displayName: 'js-with-babel',
...createJsWithBabelPreset({
babelConfig: true,
})
Expand Down
8 changes: 5 additions & 3 deletions examples/js-with-babel/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"name": "js-with-babel",
"version": "0.0.0",
"private": true,
"scripts": {
"test": "jest -c=jest.config.cjs --no-cache",
"test-isolated": "jest -c=jest-isolated.config.cjs --no-cache",
"test-esm": "node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js -c=jest-esm.config.mjs --no-cache",
"test-esm-isolated": "node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js -c=jest-esm-isolated.config.mjs --no-cache",
"tsc": "tsc --noEmit -p tsconfig-esm.json"
"test-esm": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest -c=jest-esm.config.mjs --no-cache",
"test-esm-isolated": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest -c=jest-esm-isolated.config.mjs --no-cache"
},
"devDependencies": {
"@babel/core": "^7.24.9",
"@babel/preset-env": "^7.25.0",
"@tsconfig/strictest": "^2.0.5",
"@types/jest": "^29.5.12",
"babel-jest": "^29.7.0",
"cross-env": "^7.0.3",
"jest": "^29.7.0",
"ts-jest": "^29.2.3",
"typescript": "~5.5.4"
Expand Down
3 changes: 2 additions & 1 deletion examples/js-with-babel/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"extends": "@tsconfig/strictest/tsconfig.json",
"compilerOptions": {
"module": "Node16",
"target": "ESNext",
"allowJs": true,
"types": ["jest"],
"skipLibCheck": true
"isolatedModules": false
}
}
1 change: 1 addition & 0 deletions examples/js-with-ts/jest-esm-isolated.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createJsWithTsPreset } from 'ts-jest'

/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
displayName: 'js-with-ts',
...createJsWithTsPreset({
tsconfig: 'tsconfig-esm.json',
isolatedModules: true,
Expand Down
1 change: 1 addition & 0 deletions examples/js-with-ts/jest-esm.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createJsWithTsPreset } from 'ts-jest'

/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
displayName: 'js-with-ts',
...createJsWithTsPreset({
tsconfig: 'tsconfig-esm.json'
})
Expand Down
1 change: 1 addition & 0 deletions examples/js-with-ts/jest-isolated.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { createJsWithTsPreset } = require('ts-jest')

/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
displayName: 'js-with-ts',
...createJsWithTsPreset({
isolatedModules: true,
})
Expand Down
1 change: 1 addition & 0 deletions examples/js-with-ts/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ const { createJsWithTsPreset } = require('ts-jest')

/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
displayName: 'js-with-ts',
...createJsWithTsPreset()
}
Loading

0 comments on commit 6d8063a

Please sign in to comment.