Updated JS test packages (#20180)

Updated Node (6 -> 20), NPM (6 -> 10), jsdom (11.11.0 -> 24.1.0), leche (2.2.3 -> 2.3.0), mocha (5.2.0 -> 6.2.3)
This commit is contained in:
rhertogh
2024-06-03 09:07:22 +02:00
committed by GitHub
parent 6b1591b222
commit 855522cc9a
8 changed files with 23 additions and 12 deletions

View File

@ -11,7 +11,7 @@ concurrency:
jobs:
test:
name: NPM 6 on ubuntu-latest
name: NPM 10 on ubuntu-latest
runs-on: ubuntu-latest
@ -26,9 +26,9 @@ jobs:
run: composer require "bower-asset/jquery:3.6.*@stable"
- name: Install node.js.
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 6
node-version: 20
- name: Tests.
run: |

View File

@ -0,0 +1,6 @@
{
"name": "base",
"version": "1.0.0",
"dependencies": {
}
}

View File

@ -9,9 +9,9 @@
"dependencies": {},
"devDependencies": {
"chai": "^3.5.0",
"jsdom": "11.11.0",
"leche": "^2.2.3",
"mocha": "^5.2.0",
"jsdom": "24.1.0",
"leche": "^2.3.0",
"mocha": "^6.2.3",
"mocha-jsdom": "^2.0.0",
"sinon": "^1.17.6"
},

View File

@ -49,7 +49,8 @@ describe('yii.activeForm', function () {
jsdom({
html: html,
src: fs.readFileSync(jQueryPath, 'utf-8')
src: fs.readFileSync(jQueryPath, 'utf-8'),
url: "http://foo.bar"
});
before(function () {

View File

@ -30,7 +30,8 @@ describe('yii.captcha', function () {
jsdom({
html: html,
src: fs.readFileSync(jQueryPath, 'utf-8')
src: fs.readFileSync(jQueryPath, 'utf-8'),
url: "http://foo.bar"
});
before(function () {

View File

@ -51,7 +51,8 @@ describe('yii.gridView', function () {
jsdom({
html: html,
src: fs.readFileSync(jQueryPath, 'utf-8')
src: fs.readFileSync(jQueryPath, 'utf-8'),
url: "http://foo.bar"
});
before(function () {
@ -787,7 +788,7 @@ describe('yii.gridView', function () {
assert.throws(function () {
$gridView1.yiiGridView('applyFilter');
}, "Cannot read property 'settings' of undefined");
}, "Cannot read properties of undefined (reading \'settings\')");
$gridView1.yiiGridView(settings); // Reinitialize without "beforeFilter" and "afterFilter" event handlers
$gridView1.yiiGridView('applyFilter');

View File

@ -74,7 +74,8 @@ describe('yii', function () {
jsdom({
html: fs.readFileSync('tests/js/data/yii.html', 'utf-8'),
src: fs.readFileSync(jQueryPath, 'utf-8')
src: fs.readFileSync(jQueryPath, 'utf-8'),
url: "http://foo.bar"
});
before(function () {

View File

@ -76,7 +76,8 @@ describe('yii.validation', function () {
}
jsdom({
src: fs.readFileSync('vendor/bower-asset/jquery/dist/jquery.js', 'utf-8')
src: fs.readFileSync('vendor/bower-asset/jquery/dist/jquery.js', 'utf-8'),
url: "http://foo.bar"
});
before(function () {