Skip to content

Commit

Permalink
Fix auto-watch when running npm run test:inject:debug (#8124)
Browse files Browse the repository at this point in the history
* Fix auto-watch when running `npm run test:inject:debug` (squashed)

* Fix auto-watch when running `npm run test:inject:debug` (squashed II)

* Fix quotes
  • Loading branch information
mattalxndr committed Feb 6, 2022
1 parent 512683c commit 79f034e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x

node-version: 15.x

- name: Verify NPM version
run: npm --version

- name: Set up npm cache
uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Build files
#-----------------------------------
build/
build*/
darkreader.js
debug.log

Expand Down
11 changes: 5 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"karma-coverage": "2.1.0",
"karma-firefox-launcher": "2.1.2",
"karma-jasmine": "4.0.1",
"karma-rollup-preprocessor": "7.0.7",
"karma-rollup-preprocessor": "github:jlmakes/karma-rollup-preprocessor#master",
"karma-safari-launcher": "1.0.0",
"less": "4.1.2",
"malevic": "0.18.6",
Expand Down
5 changes: 4 additions & 1 deletion tasks/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ module.exports = {
getDestDir: function ({debug, platform}) {
const buildTypeDir = `build/${debug ? 'debug' : 'release'}`;
return `${buildTypeDir}/${platform}`;
}
},
getTestDestDir: function () {
return `build-tests`;
},
};
2 changes: 2 additions & 0 deletions tests/inject/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const rollupPluginNodeResolve = require('@rollup/plugin-node-resolve').default;
const rollupPluginReplace = require('@rollup/plugin-replace');
const rollupPluginTypescript = require('@rollup/plugin-typescript');
const typescript = require('typescript');
const {getTestDestDir} = require('../../tasks/paths');

module.exports = (config) => {
config.set({
Expand Down Expand Up @@ -41,6 +42,7 @@ module.exports = (config) => {
}),
],
output: {
dir: `${getTestDestDir()}`,
strict: true,
format: 'iife',
sourcemap: 'inline',
Expand Down

0 comments on commit 79f034e

Please sign in to comment.