Skip to content

Commit

Permalink
Merge pull request BabylonJS#9773 from sguillia/ponicode
Browse files Browse the repository at this point in the history
Add configuration files for Ponicode tests
  • Loading branch information
RaananW authored Jan 19, 2021
2 parents e14e7ad + 1760428 commit 0a8c4c7
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 6 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"
]
}
]
]
}
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"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",
Expand Down Expand Up @@ -72,6 +73,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 +103,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 @@ -112,5 +115,6 @@
"webpack-stream": "~5.2.1",
"xhr2": "^0.2.0",
"xmlbuilder": "15.1.1"
}
}
},
"dependencies": {}
}
5 changes: 3 additions & 2 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"types": [],
"baseUrl": "./",
"rootDir": "./"
"rootDir": "./",
"outDir": "../.temp/manualBuildCore"
}
}
}
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
26 changes: 26 additions & 0 deletions tests/ponicode/tsconfig-compiler.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"compilerOptions": {
"target": "ES5",
"module": "commonjs",
"declaration": true,
"sourceMap": true,
"outDir": "../../.temp/tests/ponicode",
"rootDir": "babylon",
"strict": true,
"esModuleInterop": true,
"baseUrl": "../../",
"paths": {
"babylonjs/*": [
".temp/manualBuildCore/*"
]
},
"types": [
"node",
"jest"
]
},
"include": [
"babylon"
],
"exclude": []
}
26 changes: 26 additions & 0 deletions tests/ponicode/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"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": []
}

0 comments on commit 0a8c4c7

Please sign in to comment.