Skip to content

Commit

Permalink
chore(engine): Fix issue with running local tests on Mac with type de…
Browse files Browse the repository at this point in the history
…finitions (#1718)

* Adjust default karma to avoid type declares

* npmrc for wdio
  • Loading branch information
tombrunet authored Oct 17, 2023
1 parent ca88bdb commit cd93f79
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
3 changes: 3 additions & 0 deletions accessibility-checker-engine/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
const path = require("path");
let webpackConfig = require("./webpack-debug.config");
delete webpackConfig.output;
webpackConfig.module.rules[0].options = {
configFile: "tsconfig-nodeclare.json"
}
webpackConfig.module.rules.push({
test: /\.ts$/,
exclude: [path.resolve(__dirname, "test")],
Expand Down
29 changes: 29 additions & 0 deletions accessibility-checker-engine/tsconfig-nodeclare.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"compilerOptions": {
"declaration": false,
"allowJs": false,
"target": "ES5",
"removeComments": false,
"noEmitOnError": true,
"sourceMap": true,
"moduleResolution": "node",
"alwaysStrict": true,
"experimentalDecorators": true,
"resolveJsonModule": true,
// "module": "commonjs",
"outDir": "dist",
"emitDecoratorMetadata": true,
"lib": [
"dom",
"es7"
]
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules",
"coverage",
".nyc_output"
]
}
2 changes: 1 addition & 1 deletion accessibility-checker-engine/webpack-debug.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
module: {
rules: [{
test: /\.tsx?$/,
use: 'ts-loader',
loader: "ts-loader",
exclude: /node_modules/
}]
},
Expand Down
1 change: 1 addition & 0 deletions accessibility-checker/test/webdriverio/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
detect_chromedriver_version=true

0 comments on commit cd93f79

Please sign in to comment.