mirror of
https://github.com/vector-im/element-web.git
synced 2024-09-09 22:55:12 +00:00
Karma test tweaks
* Make sure we only get one js-sdk (and update runtime config to match) * Don't verifyNoOutstandingRequests (since it is hard to be certain which we will get, and makes the tests too dependent on implementation-specifics). * Disable color for npm test, to avoid confusing Jenkins
This commit is contained in:
parent
181a6a61ff
commit
bf31d6d5fa
4 changed files with 7 additions and 5 deletions
|
@ -120,6 +120,9 @@ module.exports = function (config) {
|
||||||
// alias any requires to the react module to the one in our path, otherwise
|
// alias any requires to the react module to the one in our path, otherwise
|
||||||
// we tend to get the react source included twice when using npm link.
|
// we tend to get the react source included twice when using npm link.
|
||||||
react: path.resolve('./node_modules/react'),
|
react: path.resolve('./node_modules/react'),
|
||||||
|
|
||||||
|
// same goes for js-sdk
|
||||||
|
"matrix-js-sdk": path.resolve('./node_modules/matrix-js-sdk'),
|
||||||
|
|
||||||
sinon: 'sinon/pkg/sinon.js',
|
sinon: 'sinon/pkg/sinon.js',
|
||||||
},
|
},
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
"start:prod": "parallelshell \"npm run start:js:prod\" \"npm run start:skins:css\" \"http-server -c 1 vector\"",
|
"start:prod": "parallelshell \"npm run start:js:prod\" \"npm run start:skins:css\" \"http-server -c 1 vector\"",
|
||||||
"clean": "rimraf lib vector/bundle.css vector/bundle.js vector/bundle.js.map vector/webpack.css*",
|
"clean": "rimraf lib vector/bundle.css vector/bundle.js vector/bundle.js.map vector/webpack.css*",
|
||||||
"prepublish": "npm run build:css && npm run build:compile",
|
"prepublish": "npm run build:css && npm run build:compile",
|
||||||
"test": "karma start --single-run=true --browsers PhantomJS",
|
"test": "karma start --single-run=true --browsers PhantomJS --colors=false",
|
||||||
"test:multi": "karma start"
|
"test:multi": "karma start"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -65,7 +65,6 @@ describe('joining a room', function () {
|
||||||
parentDiv.remove();
|
parentDiv.remove();
|
||||||
parentDiv = null;
|
parentDiv = null;
|
||||||
}
|
}
|
||||||
httpBackend.verifyNoOutstandingRequests();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not get stuck at a spinner', function(done) {
|
it('should not get stuck at a spinner', function(done) {
|
||||||
|
@ -74,9 +73,6 @@ describe('joining a room', function () {
|
||||||
|
|
||||||
httpBackend.when('PUT', '/presence/'+encodeURIComponent(USER_ID)+'/status')
|
httpBackend.when('PUT', '/presence/'+encodeURIComponent(USER_ID)+'/status')
|
||||||
.respond(200, {});
|
.respond(200, {});
|
||||||
if (test_utils.browserSupportsWebRTC()) {
|
|
||||||
httpBackend.when('GET', '/voip/turnServer').respond(200, {});
|
|
||||||
}
|
|
||||||
httpBackend.when('GET', '/pushrules').respond(200, {});
|
httpBackend.when('GET', '/pushrules').respond(200, {});
|
||||||
httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' });
|
httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' });
|
||||||
httpBackend.when('GET', '/sync').respond(200, {});
|
httpBackend.when('GET', '/sync').respond(200, {});
|
||||||
|
|
|
@ -42,6 +42,9 @@ module.exports = {
|
||||||
// we tend to get the react source included twice when using npm link.
|
// we tend to get the react source included twice when using npm link.
|
||||||
react: path.resolve('./node_modules/react'),
|
react: path.resolve('./node_modules/react'),
|
||||||
|
|
||||||
|
// same goes for js-sdk
|
||||||
|
"matrix-js-sdk": path.resolve('./node_modules/matrix-js-sdk'),
|
||||||
|
|
||||||
// matrix-js-sdk will use olm if it is available,
|
// matrix-js-sdk will use olm if it is available,
|
||||||
// but does not explicitly depend on it. Pull it
|
// but does not explicitly depend on it. Pull it
|
||||||
// in from node_modules if it's there.
|
// in from node_modules if it's there.
|
||||||
|
|
Loading…
Reference in a new issue