mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 11:39:41 +08:00
Fixed JS tests (#16695)
This commit is contained in:
committed by
GitHub
parent
97bd72374d
commit
dad0938918
@ -9,6 +9,7 @@
|
|||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"chai": "^3.5.0",
|
"chai": "^3.5.0",
|
||||||
|
"jsdom": "11.11.0",
|
||||||
"leche": "^2.2.3",
|
"leche": "^2.2.3",
|
||||||
"mocha": "^3.5.3",
|
"mocha": "^3.5.3",
|
||||||
"mocha-jsdom": "^2.0.0",
|
"mocha-jsdom": "^2.0.0",
|
||||||
|
|||||||
@ -33,7 +33,6 @@ describe('yii.activeForm', function () {
|
|||||||
var html = '<!doctype html><html><head><meta charset="utf-8"></head><body>' + activeFormHtml + '</body></html>';
|
var html = '<!doctype html><html><head><meta charset="utf-8"></head><body>' + activeFormHtml + '</body></html>';
|
||||||
|
|
||||||
jsdom({
|
jsdom({
|
||||||
url: 'http://localhost',
|
|
||||||
html: html,
|
html: html,
|
||||||
src: fs.readFileSync(jQueryPath, 'utf-8')
|
src: fs.readFileSync(jQueryPath, 'utf-8')
|
||||||
});
|
});
|
||||||
|
|||||||
@ -29,7 +29,6 @@ describe('yii.captcha', function () {
|
|||||||
var html = '<!doctype html><html><head><meta charset="utf-8"></head><body>' + imgHtml + '</body></html>';
|
var html = '<!doctype html><html><head><meta charset="utf-8"></head><body>' + imgHtml + '</body></html>';
|
||||||
|
|
||||||
jsdom({
|
jsdom({
|
||||||
url: 'http://localhost',
|
|
||||||
html: html,
|
html: html,
|
||||||
src: fs.readFileSync(jQueryPath, 'utf-8')
|
src: fs.readFileSync(jQueryPath, 'utf-8')
|
||||||
});
|
});
|
||||||
|
|||||||
@ -50,7 +50,6 @@ describe('yii.gridView', function () {
|
|||||||
var html = '<!doctype html><html><head><meta charset="utf-8"></head><body>' + gridViewHtml + '</body></html>';
|
var html = '<!doctype html><html><head><meta charset="utf-8"></head><body>' + gridViewHtml + '</body></html>';
|
||||||
|
|
||||||
jsdom({
|
jsdom({
|
||||||
url: 'http://localhost',
|
|
||||||
html: html,
|
html: html,
|
||||||
src: fs.readFileSync(jQueryPath, 'utf-8')
|
src: fs.readFileSync(jQueryPath, 'utf-8')
|
||||||
});
|
});
|
||||||
|
|||||||
@ -73,7 +73,6 @@ describe('yii', function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jsdom({
|
jsdom({
|
||||||
url: 'http://localhost',
|
|
||||||
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')
|
||||||
});
|
});
|
||||||
|
|||||||
@ -76,7 +76,6 @@ describe('yii.validation', function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jsdom({
|
jsdom({
|
||||||
url: 'http://localhost',
|
|
||||||
src: fs.readFileSync('vendor/bower-asset/jquery/dist/jquery.js', 'utf-8')
|
src: fs.readFileSync('vendor/bower-asset/jquery/dist/jquery.js', 'utf-8')
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user