mirror of
https://github.com/yiisoft/yii2.git
synced 2025-10-29 17:48:15 +08:00
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:
6
.github/workflows/ci-node.yml
vendored
6
.github/workflows/ci-node.yml
vendored
@ -11,7 +11,7 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: NPM 6 on ubuntu-latest
|
name: NPM 10 on ubuntu-latest
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
@ -26,9 +26,9 @@ jobs:
|
|||||||
run: composer require "bower-asset/jquery:3.6.*@stable"
|
run: composer require "bower-asset/jquery:3.6.*@stable"
|
||||||
|
|
||||||
- name: Install node.js.
|
- name: Install node.js.
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 6
|
node-version: 20
|
||||||
|
|
||||||
- name: Tests.
|
- name: Tests.
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
6
framework/base/package.json
Normal file
6
framework/base/package.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "base",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"dependencies": {
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -9,9 +9,9 @@
|
|||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"chai": "^3.5.0",
|
"chai": "^3.5.0",
|
||||||
"jsdom": "11.11.0",
|
"jsdom": "24.1.0",
|
||||||
"leche": "^2.2.3",
|
"leche": "^2.3.0",
|
||||||
"mocha": "^5.2.0",
|
"mocha": "^6.2.3",
|
||||||
"mocha-jsdom": "^2.0.0",
|
"mocha-jsdom": "^2.0.0",
|
||||||
"sinon": "^1.17.6"
|
"sinon": "^1.17.6"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -49,7 +49,8 @@ describe('yii.activeForm', function () {
|
|||||||
|
|
||||||
jsdom({
|
jsdom({
|
||||||
html: html,
|
html: html,
|
||||||
src: fs.readFileSync(jQueryPath, 'utf-8')
|
src: fs.readFileSync(jQueryPath, 'utf-8'),
|
||||||
|
url: "http://foo.bar"
|
||||||
});
|
});
|
||||||
|
|
||||||
before(function () {
|
before(function () {
|
||||||
|
|||||||
@ -30,7 +30,8 @@ describe('yii.captcha', function () {
|
|||||||
|
|
||||||
jsdom({
|
jsdom({
|
||||||
html: html,
|
html: html,
|
||||||
src: fs.readFileSync(jQueryPath, 'utf-8')
|
src: fs.readFileSync(jQueryPath, 'utf-8'),
|
||||||
|
url: "http://foo.bar"
|
||||||
});
|
});
|
||||||
|
|
||||||
before(function () {
|
before(function () {
|
||||||
|
|||||||
@ -51,7 +51,8 @@ describe('yii.gridView', function () {
|
|||||||
|
|
||||||
jsdom({
|
jsdom({
|
||||||
html: html,
|
html: html,
|
||||||
src: fs.readFileSync(jQueryPath, 'utf-8')
|
src: fs.readFileSync(jQueryPath, 'utf-8'),
|
||||||
|
url: "http://foo.bar"
|
||||||
});
|
});
|
||||||
|
|
||||||
before(function () {
|
before(function () {
|
||||||
@ -787,7 +788,7 @@ describe('yii.gridView', function () {
|
|||||||
|
|
||||||
assert.throws(function () {
|
assert.throws(function () {
|
||||||
$gridView1.yiiGridView('applyFilter');
|
$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(settings); // Reinitialize without "beforeFilter" and "afterFilter" event handlers
|
||||||
|
|
||||||
$gridView1.yiiGridView('applyFilter');
|
$gridView1.yiiGridView('applyFilter');
|
||||||
|
|||||||
@ -74,7 +74,8 @@ describe('yii', function () {
|
|||||||
|
|
||||||
jsdom({
|
jsdom({
|
||||||
html: fs.readFileSync('tests/js/data/yii.html', 'utf-8'),
|
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 () {
|
before(function () {
|
||||||
|
|||||||
@ -76,7 +76,8 @@ describe('yii.validation', function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jsdom({
|
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 () {
|
before(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user