Skip to content

Commit

Permalink
Merge pull request #5120 from nightwing/ci
Browse files Browse the repository at this point in the history
update node used in ci
  • Loading branch information
nightwing committed Apr 7, 2023
2 parents a1a160c + 37ac29e commit ed729aa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
fi
# - run: npm run lint
- run: node_modules/.bin/tsc --noImplicitAny --strict --noUnusedLocals --noImplicitReturns --noUnusedParameters --noImplicitThis ace.d.ts
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v3
with:
file: ./coverage/coverage.json
flags: unittests
Expand Down
2 changes: 1 addition & 1 deletion src/mouse/mouse_handler_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var WheelEvent = function(opts) {
};

function sendTouchEvent(type, opts, editor) {
var e = new window.Event("touch" + type, {bubbles: true, cancelable: true});
var e = new window.CustomEvent("touch" + type, {bubbles: true, cancelable: true});
Object.defineProperties(e, Object.getOwnPropertyDescriptors(opts));
editor.container.dispatchEvent(e);
}
Expand Down
21 changes: 12 additions & 9 deletions src/test/mockdom.js
Original file line number Diff line number Diff line change
Expand Up @@ -830,14 +830,14 @@ exports.load = function() {
if (typeof global == "undefined") return;
window.window = global;
Object.keys(window).forEach(function(i) {
if (!global[i]) {
addedProperties.push(i);
global.__defineGetter__(i, function() {
return window[i];
});
global.__defineSetter__(i, function() {
});
}
var desc = Object.getOwnPropertyDescriptor(global, i);
addedProperties.push({name: i, desc: desc});
global.__defineGetter__(i, function() {
return window[i];
});
global.__defineSetter__(i, function() {
console.log("attempt to set " + i);
});
});
};

Expand Down Expand Up @@ -894,7 +894,10 @@ exports.unload = function() {
var cache = req("module")._cache;
delete cache[__filename];
addedProperties.forEach(function(i) {
delete global[i];
delete global[i.name];
if (i.desc) {
Object.defineProperty(global, i.name, i.desc);
}
});
};

Expand Down

0 comments on commit ed729aa

Please sign in to comment.