Skip to content

Commit

Permalink
Fixed js tests configuration (#16694)
Browse files Browse the repository at this point in the history
  • Loading branch information
rustamwin authored and samdark committed Sep 8, 2018
1 parent 1b32a0f commit 97bd723
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/js/tests/yii.activeForm.test.js
Expand Up @@ -33,6 +33,7 @@ describe('yii.activeForm', function () {
var html = '<!doctype html><html><head><meta charset="utf-8"></head><body>' + activeFormHtml + '</body></html>';

jsdom({
url: 'http://localhost',
html: html,
src: fs.readFileSync(jQueryPath, 'utf-8')
});
Expand Down
1 change: 1 addition & 0 deletions tests/js/tests/yii.captcha.test.js
Expand Up @@ -29,6 +29,7 @@ describe('yii.captcha', function () {
var html = '<!doctype html><html><head><meta charset="utf-8"></head><body>' + imgHtml + '</body></html>';

jsdom({
url: 'http://localhost',
html: html,
src: fs.readFileSync(jQueryPath, 'utf-8')
});
Expand Down
1 change: 1 addition & 0 deletions tests/js/tests/yii.gridView.test.js
Expand Up @@ -50,6 +50,7 @@ describe('yii.gridView', function () {
var html = '<!doctype html><html><head><meta charset="utf-8"></head><body>' + gridViewHtml + '</body></html>';

jsdom({
url: 'http://localhost',
html: html,
src: fs.readFileSync(jQueryPath, 'utf-8')
});
Expand Down
1 change: 1 addition & 0 deletions tests/js/tests/yii.test.js
Expand Up @@ -73,6 +73,7 @@ describe('yii', function () {
}

jsdom({
url: 'http://localhost',
html: fs.readFileSync('tests/js/data/yii.html', 'utf-8'),
src: fs.readFileSync(jQueryPath, 'utf-8')
});
Expand Down
5 changes: 4 additions & 1 deletion tests/js/tests/yii.validation.test.js
Expand Up @@ -75,7 +75,10 @@ describe('yii.validation', function () {
yii = sandbox.yii;
}

jsdom({src: fs.readFileSync('vendor/bower-asset/jquery/dist/jquery.js', 'utf-8')});
jsdom({
url: 'http://localhost',
src: fs.readFileSync('vendor/bower-asset/jquery/dist/jquery.js', 'utf-8')
});

before(function () {
$ = window.$;
Expand Down

0 comments on commit 97bd723

Please sign in to comment.