scratch-parser
Advanced tools
Comparing version 4.3.2 to 4.3.3
@@ -351,3 +351,3 @@ { | ||
"type": "string", | ||
"not": {"enum": ["Stage", "stage"]} | ||
"not": {"enum": ["_stage_"]} | ||
}, | ||
@@ -354,0 +354,0 @@ "isStage": { |
@@ -29,5 +29,5 @@ { | ||
"devDependencies": { | ||
"@commitlint/cli": "6.1.0", | ||
"@commitlint/config-conventional": "6.1.0", | ||
"@commitlint/travis-cli": "6.1.0", | ||
"@commitlint/cli": "7.2.1", | ||
"@commitlint/config-conventional": "7.1.2", | ||
"@commitlint/travis-cli": "7.2.1", | ||
"babel-eslint": "8.2.2", | ||
@@ -51,3 +51,3 @@ "benchmark": "^2.1.1", | ||
}, | ||
"version": "4.3.2" | ||
"version": "4.3.3" | ||
} |
@@ -57,3 +57,5 @@ var fs = require('fs'); | ||
invalidStageLayerSB3Json: fs.readFileSync(path.resolve(__dirname, './data/invalid/_invalid_stage_layer.json')), | ||
invalidSpriteLayerSB3Json: fs.readFileSync(path.resolve(__dirname, './data/invalid/_invalid_sprite_layer.json')) | ||
invalidSpriteLayerSB3Json: fs.readFileSync(path.resolve(__dirname, './data/invalid/_invalid_sprite_layer.json')), | ||
invalidSpriteNameSB3Json: fs.readFileSync( | ||
path.resolve(__dirname, './data/invalid/_invalid_spriteNamed_stage_.json')) | ||
}; |
@@ -33,2 +33,18 @@ var test = require('tap').test; | ||
test('sb3', function (t) { | ||
var set = data.sb3; | ||
t.plan(set.length * 5); | ||
for (var i in data.sb3) { | ||
parser(data.sb3[i], false, function (err, result) { | ||
t.equal(err, null); | ||
t.equal(Array.isArray(result), true); | ||
var res = result[0]; | ||
var possibleZip = result[1]; | ||
t.type(res, 'object'); | ||
t.type(res.targets, 'object'); | ||
t.equal(possibleZip instanceof JSZip, true); | ||
}); | ||
} | ||
}); | ||
test('json', function (t) { | ||
@@ -35,0 +51,0 @@ var set = data.json; |
@@ -100,1 +100,10 @@ var test = require('tap').test; | ||
}); | ||
// Sprites should not be named _stage_ | ||
test('sb3 json with invalid sprite name', function (t) { | ||
validate(false, JSON.parse(data.invalidSpriteNameSB3Json), function (err, res) { | ||
t.type(err, 'object'); | ||
t.type(res, 'undefined'); | ||
t.end(); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26957223
65
115288