修改问题
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
const assert = require('assert');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const ProfilePages = require('../public/js/profile-pages.js');
|
||||
|
||||
function run() {
|
||||
@@ -77,6 +79,16 @@ function run() {
|
||||
getToken: () => 'token-x'
|
||||
}, { status: 500 }), false);
|
||||
|
||||
const profileData = fs.readFileSync(path.join(__dirname, '..', 'profile-data.html'), 'utf8');
|
||||
assert.match(profileData, /data-upload-target="#profileAvatarOssId"/);
|
||||
assert.match(profileData, /data-upload-mode="auto"/);
|
||||
assert.match(profileData, /data-upload-biz-type="avatar"/);
|
||||
assert.match(profileData, /<script src="public\/js\/md5\.js"><\/script>/);
|
||||
assert.match(profileData, /<script src="public\/js\/upload-pages\.js"><\/script>/);
|
||||
assert.match(profileData, /data-region-search-form/);
|
||||
assert.match(profileData, /data-region-search-results/);
|
||||
assert.match(profileData, /data-region-search-path/);
|
||||
|
||||
console.log('profile-pages tests passed');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user