mirror of
https://github.com/scratchfoundation/scratch-analysis.git
synced 2025-08-28 22:09:00 -04:00
Clean up tests
This commit is contained in:
parent
bc9c3e0ab3
commit
b164232b3f
5 changed files with 115 additions and 130 deletions
14
lib/sb3.js
14
lib/sb3.js
|
@ -9,7 +9,7 @@ const scripts = function (targets) {
|
|||
for (let b in targets[t].blocks) {
|
||||
if (targets[t].blocks[b].topLevel) occurances++;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
count: occurances
|
||||
|
@ -27,7 +27,7 @@ const variables = function (targets, attribute) {
|
|||
occurances++;
|
||||
idList.push(variable[0]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
count: occurances,
|
||||
|
@ -49,7 +49,7 @@ const extract = function (targets, attribute, id, hash) {
|
|||
if (typeof id !== 'undefined') idList.push(asset[id]);
|
||||
if (typeof hash !== 'undefined') hashList.push(asset[hash]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const result = {count: occurances};
|
||||
if (typeof id !== 'undefined') result.id = idList;
|
||||
|
@ -61,7 +61,7 @@ const sprites = function (targets) {
|
|||
return {
|
||||
count: targets.length - 1
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
const blocks = function (targets) {
|
||||
// Storage object
|
||||
|
@ -86,10 +86,10 @@ const blocks = function (targets) {
|
|||
};
|
||||
};
|
||||
|
||||
const extensions = function (extensions) {
|
||||
const extensions = function (list) {
|
||||
return {
|
||||
count: extensions.length,
|
||||
id: extensions
|
||||
count: list.length,
|
||||
id: list
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue