Skip to content

Commit

Permalink
Merge pull request #16 from yiisoft/master
Browse files Browse the repository at this point in the history
Updated JS test packages (yiisoft#20180)
  • Loading branch information
honsa authored Jun 5, 2024
2 parents 96ba123 + 855522c commit 7f5a377
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:

jobs:
test:
name: NPM 6 on ubuntu-latest
name: NPM 10 on ubuntu-latest

runs-on: ubuntu-latest

Expand All @@ -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: |
Expand Down
6 changes: 6 additions & 0 deletions framework/base/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "base",
"version": "1.0.0",
"dependencies": {
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
3 changes: 2 additions & 1 deletion tests/js/tests/yii.activeForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
3 changes: 2 additions & 1 deletion tests/js/tests/yii.captcha.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
5 changes: 3 additions & 2 deletions tests/js/tests/yii.gridView.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down Expand Up @@ -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');
Expand Down
3 changes: 2 additions & 1 deletion tests/js/tests/yii.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
3 changes: 2 additions & 1 deletion tests/js/tests/yii.validation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit 7f5a377

Please sign in to comment.