Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('compile cmd JS file', function() {
release({
unique: true
}, function() {
console.log('Done');
});
var pathx = path.join(__dirname, 'xpy' , 'static' , 'map.json');
var file = fis.file.wrap(pathx);
var con = file.getContent()
//console.log(JSON.parse(con).res["demo.js"].extras);
var xpath = JSON.stringify(JSON.parse(con).res["demo.js"].extras);
expect(xpath).to.equal('{"async":["demo3.js","common:module2/cc/c.js"],"moduleId":"demo"}');
//console.log(JSON.parse(con).res["init.js"].deps);
var xpath = JSON.stringify(JSON.parse(con).res["init.js"].deps);
expect(xpath).to.equal('["module/b.js"]');
var xpath = JSON.stringify(JSON.parse(con).res["init.js"].extras);
expect(xpath).to.equal('{"async":["module/jquery.js","module/data.js","module/b.js","module2/cc/c.js","common:module2/cc/c.js"],"moduleId":"init"}');
var xpath = JSON.stringify(JSON.parse(con).pkg);
expect(xpath).to.equal('{"p0":{"uri":"/static/x.js","type":"js","has":["demo.js","demo2.js","module/b.js","init.js"],"deps":["common:module2/cc/c.js","common:static/a.js","module/a.js"]}}');