Move sinon to karma framework
This frees us from manual imports, and makes things less magical as those aren't ES modules even if the code suggest that the are.
This commit is contained in:
+3
-2
@@ -4,9 +4,10 @@
|
||||
"mocha": true
|
||||
},
|
||||
"globals": {
|
||||
"chai": true
|
||||
"chai": false,
|
||||
"sinon": false
|
||||
},
|
||||
"rules": {
|
||||
"prefer-arrow-callback": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
// Assertions that make it easier to use sinon
|
||||
import sinonChai from '../node_modules/sinon-chai/lib/sinon-chai.js';
|
||||
chai.use(sinonChai);
|
||||
|
||||
// noVNC specific assertions
|
||||
chai.use(function (_chai, utils) {
|
||||
_chai.Assertion.addMethod('displayed', function (target_data) {
|
||||
|
||||
@@ -3,8 +3,6 @@ const expect = chai.expect;
|
||||
import Base64 from '../core/base64.js';
|
||||
import Display from '../core/display.js';
|
||||
|
||||
import sinon from '../vendor/sinon.js';
|
||||
|
||||
describe('Display/Canvas Helper', function () {
|
||||
const checked_data = new Uint8Array([
|
||||
0x00, 0x00, 0xff, 255, 0x00, 0x00, 0xff, 255, 0x00, 0xff, 0x00, 255, 0x00, 0xff, 0x00, 255,
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
const expect = chai.expect;
|
||||
|
||||
import sinon from '../vendor/sinon.js';
|
||||
|
||||
import Keyboard from '../core/input/keyboard.js';
|
||||
import * as browser from '../core/util/browser.js';
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
const expect = chai.expect;
|
||||
|
||||
import sinon from '../vendor/sinon.js';
|
||||
|
||||
import Mouse from '../core/input/mouse.js';
|
||||
import * as eventUtils from '../core/util/events.js';
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import Websock from '../core/websock.js';
|
||||
import { encodings } from '../core/encodings.js';
|
||||
|
||||
import FakeWebSocket from './fake.websocket.js';
|
||||
import sinon from '../vendor/sinon.js';
|
||||
|
||||
/* UIEvent constructor polyfill for IE */
|
||||
(() => {
|
||||
|
||||
@@ -3,8 +3,6 @@ const expect = chai.expect;
|
||||
|
||||
import * as Log from '../core/util/logging.js';
|
||||
|
||||
import sinon from '../vendor/sinon.js';
|
||||
|
||||
describe('Utils', function() {
|
||||
"use strict";
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@ const expect = chai.expect;
|
||||
import Websock from '../core/websock.js';
|
||||
import FakeWebSocket from './fake.websocket.js';
|
||||
|
||||
import sinon from '../vendor/sinon.js';
|
||||
|
||||
describe('Websock', function() {
|
||||
"use strict";
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ const expect = chai.expect;
|
||||
|
||||
import * as WebUtil from '../app/webutil.js';
|
||||
|
||||
import sinon from '../vendor/sinon.js';
|
||||
|
||||
describe('WebUtil', function() {
|
||||
"use strict";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user