Skip to content

Commit

Permalink
add configuration files for Ponicode tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sguillia committed Jan 11, 2021
1 parent 9fc4ccb commit 4556de9
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@
},
"editor.tabSize": 4,
"typescript.tsdk": "node_modules\\typescript\\lib",
"typescript.preferences.importModuleSpecifier": "relative"
}
"typescript.preferences.importModuleSpecifier": "relative",
"ponicode.testSettings.testLocation.locationType": "Custom",
"ponicode.testSettings.testLocation.path": "{rootDir}/tests/ponicode/babylon/{filePathWithoutSrc}/{fileName}.test.{ext}"
}
12 changes: 12 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
[
"@babel/preset-env",
{
"exclude": [
"@babel/plugin-transform-regenerator"
]
}
]
]
}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@
"readme": "Babylon.js is a 3D engine based on webgl and javascript",
"readmeFilename": "README.md",
"devDependencies": {
"@babel/preset-env": "^7.12.11",
"@fortawesome/fontawesome-svg-core": "~1.2.28",
"@fortawesome/free-regular-svg-icons": "~5.13.0",
"@fortawesome/free-solid-svg-icons": "~5.13.0",
"@fortawesome/react-fontawesome": "~0.1.10",
"@svgr/webpack": "^5.4.0",
"@types/chai": "^4.2.11",
"@types/dagre": "^0.7.44",
"@types/jest": "^26.0.19",
"@types/mocha": "^7.0.2",
"@types/node": "^14.0.11",
"@types/react": "~16.9.35",
Expand Down Expand Up @@ -72,6 +74,7 @@
"gulp-tslint": "^8.1.4",
"gulp-typedoc": "^2.2.5",
"gulp-typescript": "4.0.2",
"jest": "^26.6.3",
"karma": "^5.0.9",
"karma-browserstack-launcher": "^1.6.0",
"karma-chai": "^0.1.0",
Expand Down Expand Up @@ -101,6 +104,7 @@
"symlink-dir": "^4.1.0",
"through2": "~3.0.1",
"ts-loader": "^7.0.5",
"ts-node": "^9.1.1",
"tslib": ">=1.10.0",
"tslint": "^6.1.2",
"typedoc": "^0.17.7",
Expand All @@ -113,4 +117,4 @@
"xhr2": "^0.2.0",
"xmlbuilder": "15.1.1"
}
}
}
4 changes: 3 additions & 1 deletion src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"compilerOptions": {
"types": [],
"baseUrl": "./",
"rootDir": "./"
"rootDir": "./",
"outDir": "../.temp/manualBuildCore",
"composite": true
}
}
12 changes: 12 additions & 0 deletions tests/ponicode/babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
[
"@babel/preset-env",
{
"exclude": [
"@babel/plugin-transform-regenerator"
]
}
]
]
}
15 changes: 15 additions & 0 deletions tests/ponicode/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Config } from "@jest/types"
import path from "path"

const testDir = path.resolve(__dirname, "../../.temp/tests/ponicode")
const sourceDir = path.resolve(__dirname, "../../.temp/manualBuildCore")

const config: Config.InitialOptions = {
rootDir: testDir,
testMatch: ["**/*.test.js"],
moduleNameMapper: {
"babylonjs/(.*)": path.join(sourceDir, "$1"),
},
}

export = config
31 changes: 31 additions & 0 deletions tests/ponicode/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"compilerOptions": {
"target": "ES5",
"module": "commonjs",
"declaration": true,
"sourceMap": true,
"outDir": "../../.temp/tests/ponicode",
"rootDir": "babylon",
"strict": true,
"esModuleInterop": true,
"baseUrl": "../../",
"paths": {
"babylonjs/*": [
"./src/*"
]
},
"types": [
"node",
"jest"
]
},
"include": [
"babylon"
],
"exclude": [],
"references": [
{
"path": "../../src"
}
]
}

0 comments on commit 4556de9

Please sign in to comment.