mirror of
https://github.com/scratchfoundation/scratch-analysis.git
synced 2025-05-15 07:11:16 -04:00
Add explicit test just for extensions
This commit is contained in:
parent
f1f210df0d
commit
9cc13c4519
2 changed files with 20 additions and 0 deletions
test
BIN
test/fixtures/sb3/extensions.sb3
vendored
Normal file
BIN
test/fixtures/sb3/extensions.sb3
vendored
Normal file
Binary file not shown.
|
@ -13,6 +13,10 @@ const complexBinary = fs.readFileSync(
|
|||
path.resolve(__dirname, '../fixtures/sb3/complex.sb3')
|
||||
);
|
||||
|
||||
const extensionsBinary = fs.readFileSync(
|
||||
path.resolve(__dirname, '../fixtures/sb3/extensions.sb3')
|
||||
);
|
||||
|
||||
test('defalt (object)', t => {
|
||||
analysis(defaultObject, (err, result) => {
|
||||
t.true(typeof err === 'undefined' || err === null);
|
||||
|
@ -258,3 +262,19 @@ test('complex (binary)', t => {
|
|||
t.end();
|
||||
});
|
||||
});
|
||||
|
||||
test('extensions', t => {
|
||||
analysis(extensionsBinary, (err, result) => {
|
||||
t.true(typeof err === 'undefined' || err === null);
|
||||
t.type(result, 'object');
|
||||
|
||||
t.type(result.extensions, 'object');
|
||||
t.equal(result.extensions.count, 2);
|
||||
t.deepEqual(result.extensions.id, [
|
||||
'translate',
|
||||
'text2speech'
|
||||
]);
|
||||
|
||||
t.end();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue