Minor bug fixes for tests
This commit is contained in:
parent
28c4d555d4
commit
153f515f15
|
|
@ -1,7 +0,0 @@
|
|||
machine:
|
||||
node:
|
||||
version: 8.2.0
|
||||
|
||||
dependencies:
|
||||
override:
|
||||
- yarn
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"build": "gulp build",
|
||||
"lint": "gulp lint",
|
||||
"release": "gulp release",
|
||||
"test": "jest --silent",
|
||||
"test:watch": "jest --silent --watch",
|
||||
|
|
@ -31,6 +32,7 @@
|
|||
"gulp-uglify": "^3.0.0",
|
||||
"gulp-zip": "^4.0.0",
|
||||
"jest": "^20.0.4",
|
||||
"node-sass": "^4.5.3",
|
||||
"run-sequence": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/* eslint no-unused-vars: "off" */
|
||||
|
||||
const $ = require('jquery');
|
||||
window.$ = window.jQuery = $;
|
||||
|
||||
|
|
@ -319,7 +321,7 @@ describe('tests for "plugins" module', () => {
|
|||
await enablePlugin('plugin');
|
||||
expect(fetch).toBeCalledWith({
|
||||
type: 'POST',
|
||||
url: 'admin/plugins?action=enable&name=plugin',
|
||||
url: 'admin/plugins/manage?action=enable&name=plugin',
|
||||
dataType: 'json'
|
||||
});
|
||||
expect(toastr.warning).not.toBeCalled();
|
||||
|
|
@ -354,7 +356,7 @@ describe('tests for "plugins" module', () => {
|
|||
await disablePlugin('plugin');
|
||||
expect(fetch).toBeCalledWith({
|
||||
type: 'POST',
|
||||
url: 'admin/plugins?action=disable&name=plugin',
|
||||
url: 'admin/plugins/manage?action=disable&name=plugin',
|
||||
dataType: 'json'
|
||||
});
|
||||
expect(toastr.warning).not.toBeCalled();
|
||||
|
|
@ -395,7 +397,7 @@ describe('tests for "plugins" module', () => {
|
|||
});
|
||||
expect(fetch).toBeCalledWith({
|
||||
type: 'POST',
|
||||
url: 'admin/plugins?action=delete&name=plugin',
|
||||
url: 'admin/plugins/manage?action=delete&name=plugin',
|
||||
dataType: 'json'
|
||||
});
|
||||
await deletePlugin('plugin');
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/* eslint no-unused-vars: "off" */
|
||||
|
||||
const $ = require('jquery');
|
||||
window.$ = window.jQuery = $;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/* eslint no-unused-vars: "off" */
|
||||
|
||||
const $ = require('jquery');
|
||||
window.jQuery = window.$ = $;
|
||||
|
||||
|
|
@ -18,7 +20,7 @@ describe('tests for "i18n" module', () => {
|
|||
|
||||
it('get translated text', () => {
|
||||
const trans = require(modulePath).trans;
|
||||
|
||||
|
||||
expect(trans('text')).toBe('text');
|
||||
expect(trans('text.nothing')).toBe('text.nothing');
|
||||
expect(trans('nested.sth')).toBe(':sth here!');
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/* eslint no-unused-vars: "off" */
|
||||
|
||||
const $ = require('jquery');
|
||||
window.$ = window.jQuery = $;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/* eslint no-unused-vars: "off" */
|
||||
|
||||
const $ = require('jquery');
|
||||
window.$ = window.jQuery = $;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* exported changePreference, changeTexture, ajaxChangeTexture, changePlayerName, changeOwner, deletePlayer */
|
||||
|
||||
'use strict';
|
||||
|
||||
function changePreference() {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* exported enablePlugin, disablePlugin, deletePlugin */
|
||||
|
||||
'use strict';
|
||||
|
||||
function enablePlugin(name) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* exported initUsersTable, initPlayersTable, initPluginsTable */
|
||||
|
||||
'use strict';
|
||||
|
||||
function initUsersTable() {
|
||||
|
|
@ -270,3 +268,11 @@ function initPluginsTable() {
|
|||
]
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof require !== 'undefined' && typeof module !== 'undefined') {
|
||||
module.exports = {
|
||||
initUsersTable,
|
||||
initPlayersTable,
|
||||
initPluginsTable
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* exported downloadUpdates */
|
||||
|
||||
'use strict';
|
||||
|
||||
function downloadUpdates() {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
/* exported changeUserEmail, changeUserNickName, changeUserPwd,
|
||||
changeBanStatus, changeAdminStatus, deleteUserAccount */
|
||||
|
||||
'use strict';
|
||||
|
||||
function changeUserEmail(uid) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* exported trans */
|
||||
|
||||
'use strict';
|
||||
|
||||
$.locales = {};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* exported showMsg, showAjaxError, showModal */
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
/* global MSP */
|
||||
/* exported TexturePreview */
|
||||
|
||||
class TexturePreview {
|
||||
constructor(type, tid, preference) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* exported isEmpty, fetch, getQueryString, debounce, url */
|
||||
|
||||
'use strict';
|
||||
|
||||
console.log(`\n %c Blessing Skin v${blessing.version} %c https://blessing.studio \n\n`, 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');
|
||||
|
|
@ -102,6 +100,7 @@ if (typeof require !== 'undefined' && typeof module !== 'undefined') {
|
|||
isEmpty,
|
||||
fetch,
|
||||
debounce,
|
||||
getQueryString,
|
||||
url
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* exported changeTextureName, deleteTexture */
|
||||
|
||||
'use strict';
|
||||
|
||||
$(document).on('click', '.more.like', function () {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
/* global MSP */
|
||||
/* exported upload */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
|
@ -128,3 +127,9 @@ function upload() {
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof require !== 'undefined' && typeof module !== 'undefined') {
|
||||
module.exports = {
|
||||
upload
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
/* global MSP */
|
||||
/* exported renameClosetItem, removeFromCloset, setAsAvatar */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
/* global MSP, defaultSkin, selectedTextures */
|
||||
/* exported changePlayerName, clearTexture, ajaxClearTexture, addNewPlayer, deletePlayer, setTexture */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
|
@ -213,6 +212,7 @@ if (typeof require !== 'undefined' && typeof module !== 'undefined') {
|
|||
module.exports = {
|
||||
changePlayerName,
|
||||
ajaxClearTexture,
|
||||
clearTexture,
|
||||
deletePlayer,
|
||||
addNewPlayer,
|
||||
setTexture
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* exported changeNickName, changePassword, changeEmail, deleteAccount, deleteAccount */
|
||||
|
||||
'use strict';
|
||||
|
||||
function changeNickName() {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* exported sign */
|
||||
|
||||
function sign() {
|
||||
fetch({
|
||||
type: 'POST',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user