Skip to content

Commit

Permalink
Remove try/catch
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeti-or committed Mar 14, 2018
1 parent 35f33e3 commit 3832954
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/order/order.test.js
Expand Up @@ -23,15 +23,14 @@ const checkCycledRequires = bundle => {
const webpackRequire = function(moduleIndex, moduleId) {
// check that modules are not required inside themselves
moduleIndex === moduleId && (result = false);
return { applyDecls : () => {} };
};

// module.exports for faster executing
nodeEval(`module.exports = ` + bundle, 'main.bundle.js', { webpackJsonp });

webpackModules.forEach((webpackModule, moduleIndex) => {
try {
webpackModule({}, {}, webpackRequire.bind(webpackRequire, moduleIndex));
} catch(e) { }
webpackModule({}, {}, webpackRequire.bind(webpackRequire, moduleIndex));
});

return result;
Expand Down Expand Up @@ -142,10 +141,10 @@ describe('order', () => {
'common.blocks/button' : {
'button.js' : `require('m:theme=normal')`,
'_theme' : {
'button_theme_normal.js' : `'_theme' + '_normal')`
'button_theme_normal.js' : `('_theme' + '_normal')`
},
'_size' : {
'button_size_m.js' : `'_theme' + '_size')`
'button_size_m.js' : `('_theme' + '_size')`
}
}
};
Expand Down

0 comments on commit 3832954

Please sign in to comment.