显示调整
This commit is contained in:
1 parent
081d06c70e
commit
e2df519d2e
25 files changed
+291
-73
No files matched your search
@@ -17,6 +17,7 @@ function functionBody(source, name, nextName) {
|
||||
for (const root of roots) {
|
||||
const viewerPath = path.join(root, 'viewer/spine.html');
|
||||
const html = fs.readFileSync(viewerPath, 'utf8');
|
||||
const css = fs.readFileSync(path.join(root, 'viewer/spine.css'), 'utf8');
|
||||
const script = html.match(/<script>([\s\S]*?)<\/script>/)[1];
|
||||
new vm.Script(script);
|
||||
|
||||
@@ -33,6 +34,7 @@ for (const root of roots) {
|
||||
|
||||
const capture = functionBody(script, 'captureStableFitBounds', 'fitToCanvas');
|
||||
assert.match(capture, /getBounds\(skeleton\)/);
|
||||
assert.match(css, /#status \{\s*position: absolute; left: 50%;[^}]*transform: translateX\(-50%\)/, 'status notice must be horizontally centered');
|
||||
|
||||
const manifest = JSON.parse(fs.readFileSync(path.join(root, 'manifest.json'), 'utf8'));
|
||||
for (const language of manifest.languages) {
|
||||
|
||||
Reference in new issue
Block a user