remove not used dev-dependencies giving a (non-exploitable) Dependabot warning

This commit is contained in:
Ralf Becker 2021-06-01 17:39:42 +02:00
parent c7d80123ce
commit 639bf0926a
3 changed files with 1 additions and 46 deletions

1
.gitignore vendored
View File

@ -46,6 +46,7 @@
/sitemgr/ /sitemgr/
/stylite/ /stylite/
/swool/ /swool/
/test/
/tracker/ /tracker/
/usage/ /usage/
/vendor/ /vendor/

View File

@ -8,19 +8,12 @@
"devDependencies": { "devDependencies": {
"@types/jquery": "^3.5.5", "@types/jquery": "^3.5.5",
"@types/jqueryui": "^1.12.14", "@types/jqueryui": "^1.12.14",
"chai": "^4.2.0",
"grunt": "^1.3.0", "grunt": "^1.3.0",
"grunt-contrib-cssmin": "^2.2.1", "grunt-contrib-cssmin": "^2.2.1",
"grunt-newer": "^1.3.0", "grunt-newer": "^1.3.0",
"grunt-terser": "^1.0.0", "grunt-terser": "^1.0.0",
"grunt-ts": "^6.0.0-beta.22", "grunt-ts": "^6.0.0-beta.22",
"jsdom": "16.4.0",
"mocha": "^8.2.1",
"terser": "^4.8.0", "terser": "^4.8.0",
"typescript": "^3.9.7" "typescript": "^3.9.7"
},
"scripts": {
"test": "mocha",
"debug-test": "mocha --inspect-brk"
} }
} }

View File

@ -1,39 +0,0 @@
let expect = require('chai').expect;
const { JSDOM } = require('jsdom'),
// the file I will be loading
uri = 'https://boulder.egroupware.org/egroupware/login.php',
// the options that I will be giving to jsdom
options = {
runScripts: 'dangerously', // 'outside-only' does NOT work for scripts in the loaded page!
resources: 'usable'
};
// load from an external file
describe('EGroupware login-page', function() {
it('Should load egw object', function() {
debugger
return JSDOM.fromURL(uri, options).then(function (dom) {
let window = dom.window,
document = window.document;
expect(document.querySelectorAll('form')).key(0);
expect(document.querySelectorAll('form')[0].action).to.be.a('string').and.satisfy(msg => msg.startsWith(uri));
return new Promise((resolve, reject) => {
window.onload = resolve;
}).then(function() {
console.log('Window loaded :)');
return new Promise((resolve, reject) => {
window.egw_LAB.wait(function() {
console.log('Async script-loading / egw_LAB done :)')
resolve(window.egw);
});
})
});
}).then(function(egw) {
expect(egw.webserverUrl).equal('/egroupware', 'egw.webserverURL !== "/egroupware"');
expect(egw.lang('Test12345 %1', 'success')).to.equal('Test12345 success');
egw.window.close();
})
})
})